{"action":"created","issue":{"url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java/issues/40","repository_url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java","labels_url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java/issues/40/comments","events_url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java/issues/40/events","html_url":"https://github.com/CurrencyCloud/currencycloud-java/issues/40","id":144206818,"number":40,"title":"Payment creation missing payer country and address (for USD / CAD payments)","user":{"login":"jonasmonese","id":18137789,"avatar_url":"https://avatars.githubusercontent.com/u/18137789?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasmonese","html_url":"https://github.com/jonasmonese","followers_url":"https://api.github.com/users/jonasmonese/followers","following_url":"https://api.github.com/users/jonasmonese/following{/other_user}","gists_url":"https://api.github.com/users/jonasmonese/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasmonese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasmonese/subscriptions","organizations_url":"https://api.github.com/users/jonasmonese/orgs","repos_url":"https://api.github.com/users/jonasmonese/repos","events_url":"https://api.github.com/users/jonasmonese/events{/privacy}","received_events_url":"https://api.github.com/users/jonasmonese/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T09:24:56Z","updated_at":"2016-05-11T08:14:01Z","closed_at":null,"body":"/** Create a Payment */\r\n    @POST\r\n    @Path(\"payments/create\")\r\n    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n    Payment createPayment(\r\n            @HeaderParam(\"X-Auth-Token\") String authToken,\r\n            @FormParam(\"currency\") String currency,\r\n            @FormParam(\"beneficiary_id\") String beneficiaryId,\r\n            @FormParam(\"amount\") BigDecimal amount,\r\n            @FormParam(\"reason\") String reason,\r\n            @FormParam(\"reference\") String reference,\r\n            @Nullable @FormParam(\"payment_date\") java.sql.Date paymentDate,\r\n            @Nullable @FormParam(\"payment_type\") String paymentType,\r\n            @Nullable @FormParam(\"conversion_id\") String conversionId,\r\n            @Nullable @FormParam(\"payer_entity_type\") String payerEntityType,\r\n            @Nullable @FormParam(\"payer_company_name\") String payerCompanyName,\r\n            @Nullable @FormParam(\"payer_first_name\") String payerFirstName,\r\n            @Nullable @FormParam(\"payer_last_name\") String payerLastName,\r\n            @Nullable @FormParam(\"payer_city\") String payerCity,\r\n            @Nullable @FormParam(\"payer_postcode\") String payerPostcode,\r\n            @Nullable @FormParam(\"payer_state_or_province\") String payerStateOrProvince,\r\n            @Nullable @FormParam(\"payer_date_of_birth\") java.sql.Date payerDateOfBirth,\r\n            @Nullable @FormParam(\"payer_country\") String payerCountry,\r\n            @Nullable @FormParam(\"payer_address[]\") List<String> payerAddress,\r\n            @Nullable @FormParam(\"payer_identification_type\") String payerIdentificationType,\r\n            @Nullable @FormParam(\"payer_identification_value\") String payerIdentificationValue,\r\n            @Nullable @FormParam(\"on_behalf_of\") String onBehalfOf\r\n    ) throws ResponseException;\r\n\r\npublic Payment createPayment(Payment payment, @Nullable Payer payer) throws CurrencyCloudException {\r\n        if (payer == null) {\r\n            payer = Payer.create();\r\n        }\r\n        return api.createPayment(authToken,\r\n                                 payment.getCurrency(),\r\n                                 payment.getBeneficiaryId(),\r\n                                 payment.getAmount(),\r\n                                 payment.getReason(),\r\n                                 payment.getReference(),\r\n                                 dateOnly(payment.getPaymentDate()),\r\n                                 payment.getPaymentType(),\r\n                                 payment.getConversionId(),\r\n                                 payer.getLegalEntityType(),\r\n                                 payer.getCompanyName(),\r\n                                 payer.getFirstName(),\r\n                                 payer.getLastName(),\r\n                                 payer.getCity(),\r\n                                 payer.getPostcode(),\r\n                                 payer.getStateOrProvince(),\r\n                                 dateOnly(payer.getDateOfBirth()),\r\n                                 payer.getCountry(),\r\n                                 payer.getAddress(),\r\n                                 payer.getIdentificationType(),\r\n                                 payer.getIdentificationValue(),\r\n                                 onBehalfOf\r\n        );\r\n    }"},"comment":{"url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java/issues/comments/218391842","html_url":"https://github.com/CurrencyCloud/currencycloud-java/issues/40#issuecomment-218391842","issue_url":"https://api.github.com/repos/CurrencyCloud/currencycloud-java/issues/40","id":218391842,"user":{"login":"yorikim","id":1620973,"avatar_url":"https://avatars.githubusercontent.com/u/1620973?v=3","gravatar_id":"","url":"https://api.github.com/users/yorikim","html_url":"https://github.com/yorikim","followers_url":"https://api.github.com/users/yorikim/followers","following_url":"https://api.github.com/users/yorikim/following{/other_user}","gists_url":"https://api.github.com/users/yorikim/gists{/gist_id}","starred_url":"https://api.github.com/users/yorikim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yorikim/subscriptions","organizations_url":"https://api.github.com/users/yorikim/orgs","repos_url":"https://api.github.com/users/yorikim/repos","events_url":"https://api.github.com/users/yorikim/events{/privacy}","received_events_url":"https://api.github.com/users/yorikim/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T08:14:01Z","updated_at":"2016-05-11T08:14:01Z","body":"Work in progress"}}