/* (non-Javadoc)
@see com.popbill.api.TaxinvoiceService#issue(java.lang.String, com.popbill.api.taxinvoice.MgtKeyType, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String)
188498
@Override
    public IssueResponse issue(String CorpNum, MgtKeyType KeyType, String MgtKey,
                          String Memo, String EmailSubject, boolean ForceIssue, String UserID)
            throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

        IssueRequest request = new IssueRequest();
        request.memo = Memo;
        request.emailSubject = EmailSubject;
        request.forceIssue = ForceIssue;

        String PostData = toJsonString(request);

        return httppost("/Taxinvoice/" + KeyType.name() + "/" + MgtKey,
                CorpNum, PostData, UserID, "ISSUE", IssueResponse.class);
    }
488957
@Override
    public Response register(String CorpNum, Taxinvoice taxinvoice,
                             String UserID, boolean writeSpecification) throws PopbillException {
        if (taxinvoice == null)
            throw new PopbillException(-99999999, "세금계산서 정보가 입력되지 않았습니다.");

        String PostData = toJsonString(taxinvoice);

        if (writeSpecification) {
            PostData = "{\"writeSpecification\":true," + PostData.substring(1);
        }

        return httppost("/Taxinvoice", CorpNum, PostData, UserID,
                Response.class);
    }
366615
@Override
    public TaxinvoiceLog[] getLogs(String CorpNum, MgtKeyType KeyType,
                                   String MgtKey) throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

        return httpget(
                "/Taxinvoice/" + KeyType.name() + "/" + MgtKey + "/Logs",
                CorpNum, null, TaxinvoiceLog[].class);
    }
1292309
@Override
  public final void error(String key, String error) throws IOException {
    if (key != null) {
      add(key, false);
      setError(newCurrentPosition, error, newCurrentExisting);
    }
  }
580518
def issue(self, invoice_id, **kwargs):
        "
        url = "{}/{}/issue".format(self.base_url, invoice_id)
        return self.post_url(url, {}, **kwargs)
973236
public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) {
		IBase issue = createIssue(theCtx, theOperationOutcome);
		populateDetails(theCtx, issue, theSeverity, theDetails, theLocation, theCode);
	}
759573
@Override
    public Response send(String CorpNum, MgtKeyType KeyType, String MgtKey,
                         String Memo) throws PopbillException {
        return send(CorpNum, KeyType, MgtKey, Memo, null);
    }
433015
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final String[] data = issue.getData();
		if (data != null && data.length > 0) {
			final String expectedType = data[0];
			final ReturnTypeAddModification modification = new ReturnTypeAddModification(expectedType);
			modification.setIssue(issue);
			modification.setTools(provider);
			acceptor.accept(issue,
					MessageFormat.format(Messages.SARLQuickfixProvider_13, expectedType),
					Messages.SARLQuickfixProvider_14,
					JavaPluginImages.IMG_CORRECTION_ADD,
					modification,
					IProposalRelevance.CHANGE_RETURN_TYPE);
		}
	}
856078
@Fix(io.sarl.lang.validation.IssueCodes.INVALID_FIRING_EVENT_TYPE)
	public void fixInvalidFiringEventType(final Issue issue, IssueResolutionAcceptor acceptor) {
		FiredEventRemoveModification.accept(this, issue, acceptor);
	}
168095
@Override
    public String getMassPrintURL(String CorpNum, MgtKeyType KeyType,
                                  String[] MgtKeyList, String UserID) throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKeyList == null || MgtKeyList.length == 0)
            throw new PopbillException(-99999999, "관리번호 목록이 입력되지 않았습니다.");

        String PostData = toJsonString(MgtKeyList);

        URLResponse response = httppost("/Taxinvoice/" + KeyType.name()
                + "?Print", CorpNum, PostData, UserID, URLResponse.class);

        return response.url;
    }
97117
@Override
    public Response sendFAX(String CorpNum, MgtKeyType KeyType, String MgtKey,
                            String Sender, String Receiver) throws PopbillException {
        return sendFAX(CorpNum, KeyType, MgtKey, Sender, Receiver, null);
    }
1134515
@Override
	public Cashbill getDetailInfo(String CorpNum, String MgtKey)
			throws PopbillException {
		if (MgtKey == null || MgtKey.isEmpty())
			throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

		return httpget("/Cashbill/" + MgtKey + "?Detail", CorpNum,
				null, Cashbill.class);
	}
1231159
@Override
	public FAXSearchResult search(String corpNum, String sDate, String eDate,
			String[] state, Boolean reserveYN, Boolean senderOnly, int page,
			int perPage, String order) throws PopbillException {
		return search(corpNum, sDate, eDate, state, reserveYN, senderOnly, page, perPage, order, null);
	}
610048
public void billingAccount_phonebook_bookKey_PUT(String billingAccount, String bookKey, OvhPhonebookMaster body) throws IOException {
		String qPath = "/telephony/{billingAccount}/phonebook/{bookKey}";
		StringBuilder sb = path(qPath, billingAccount, bookKey);
		exec(qPath, "PUT", sb.toString(), body);
	}
358022
@Fix(org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_DISCOURAGED)
	public void fixDiscouragedFieldName(final Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRemoveModification.accept(this, issue, acceptor);
	}
942924
@Override
    public Response attachStatement(String CorpNum, MgtKeyType KeyType, String MgtKey,
                                    int SubItemCode, String SubMgtKey) throws PopbillException {

        DocRequest request = new DocRequest();
        request.ItemCode = Integer.toString(SubItemCode);
        request.MgtKey = SubMgtKey;

        String PostData = toJsonString(request);

        return httppost("/Taxinvoice/" + KeyType.name() + "/" + MgtKey + "/AttachStmt",
                CorpNum, PostData, null, "", Response.class);
    }
168259
def issue(ctx, accountable, issue_key):
    
    accountable.issue_key = issue_key
    if not ctx.invoked_subcommand:
        issue = accountable.issue_meta()
        headers = issue.keys()
        rows = [headers, [v for k, v in issue.items()]]
        print_table(SingleTable(rows))