From 1c2f7cbc76e37ce57176b946e234a202c99b8c7e Mon Sep 17 00:00:00 2001 From: Satoshi Imai Date: Thu, 18 Aug 2022 13:48:06 +0900 Subject: [PATCH 1/4] Generate --- docs/index.md | 2073 ++++++++++++-- partner.yaml | 2475 ++++++++++++++++- .../#TestCreatePaymentTransaction.cs# | 146 + .../TestBulkCreateTransaction.cs | 15 +- .../TestCancelCashtray.cs | 3 +- .../TestCreateBill.cs | 19 +- .../TestCreateCampaign.cs | 443 +++ .../TestCreateCashtray.cs | 25 +- .../TestCreateCheck.cs | 259 +- .../TestCreateCpmTransaction.cs | 123 + .../TestCreateCustomerAccount.cs | 21 +- .../TestCreateExchangeTransaction.cs | 37 +- .../TestCreateExternalTransaction.cs | 128 + .../TestCreateOrganization.cs | 159 +- .../TestCreatePaymentTransaction.cs | 82 +- .../TestCreateShop.cs | 57 +- .../TestCreateShopV2.cs | 91 +- .../TestCreateTopupTransaction.cs | 124 +- .../TestCreateTopupTransactionWithCheck.cs | 7 +- .../TestCreateTransaction.cs | 61 +- .../TestCreateTransferTransaction.cs | 59 +- .../TestCreateUserAccount.cs | 77 + .../TestDeleteAccount.cs | 56 + .../TestGetAccount.cs | 3 +- .../TestGetBulkTransaction.cs | 3 +- .../TestGetCampaign.cs | 39 + .../TestGetCashtray.cs | 3 +- .../TestGetCpmToken.cs | 39 + .../TestGetCustomerAccounts.cs | 114 +- .../TestGetPing.cs | 1 + ...estGetPrivateMoneyOrganizationSummaries.cs | 37 +- .../TestGetPrivateMoneySummary.cs | 74 + .../TestGetPrivateMoneys.cs | 13 +- .../TestGetShop.cs | 3 +- .../TestGetShopAccounts.cs | 41 +- .../TestGetTransaction.cs | 5 +- .../TestGetUser.cs | 1 + .../TestListAccountBalances.cs | 37 +- .../TestListAccountExpiredBalances.cs | 37 +- .../TestListBills.cs | 173 +- .../TestListCampaigns.cs | 93 + .../TestListCustomerTransactions.cs | 89 +- .../TestListShops.cs | 111 +- .../TestListTransactions.cs | 199 +- .../TestListTransactionsV2.cs | 368 +++ .../TestListTransfers.cs | 195 +- .../TestListUserAccounts.cs | 38 +- .../TestRefundExternalTransaction.cs | 56 + .../TestRefundTransaction.cs | 11 +- .../TestSendEcho.cs | 1 + .../TestUpdateAccount.cs | 44 +- .../TestUpdateBill.cs | 17 +- .../TestUpdateCampaign.cs | 464 +++ .../TestUpdateCashtray.cs | 21 +- .../TestUpdateCustomerAccount.cs | 93 + .../TestUpdateShop.cs | 91 +- .../Request/CreateCampaign.cs | 46 + .../Request/CreateCpmTransaction.cs | 33 + .../Request/CreateExchangeTransaction.cs | 4 +- .../Request/CreateExternalTransaction.cs | 34 + .../Request/CreatePaymentTransaction.cs | 10 +- .../Request/CreateTopupTransaction.cs | 9 +- .../CreateTopupTransactionWithCheck.cs | 4 +- .../Request/CreateTransaction.cs | 4 +- .../Request/CreateTransferTransaction.cs | 5 +- .../Request/CreateUserAccount.cs | 30 + .../Request/DeleteAccount.cs | 28 + .../Request/GetCampaign.cs | 27 + .../Request/GetCpmToken.cs | 27 + .../Request/GetCustomerAccounts.cs | 1 + .../Request/GetPrivateMoneySummary.cs | 29 + .../Request/GetTransaction.cs | 4 +- .../Request/ListCampaigns.cs | 30 + .../Request/ListTransactionsV2.cs | 41 + .../Request/ListUserAccounts.cs | 6 +- .../Request/RefundExternalTransaction.cs | 28 + .../Request/RefundTransaction.cs | 4 +- .../Request/UpdateAccount.cs | 2 + .../Request/UpdateCampaign.cs | 44 + .../Request/UpdateCustomerAccount.cs | 30 + .../Response/Account.cs | 5 +- .../Response/AccountDeleted.cs | 11 + .../Response/AccountDetail.cs | 7 +- .../Response/AccountWithUser.cs | 6 +- .../AccountWithoutPrivateMoneyDetail.cs | 5 +- src/PokepayPartnerCsharpSdk/Response/Bill.cs | 4 +- .../Response/BulkTransaction.cs | 4 +- .../Response/Campaign.cs | 29 + .../Response/Cashtray.cs | 4 +- .../Response/CashtrayAttempt.cs | 4 +- .../Response/CashtrayWithResult.cs | 4 +- .../Response/CpmToken.cs | 20 + .../Response/ExternalTransaction.cs | 22 + .../Response/PaginatedAccountDetails.cs | 16 + .../Response/PaginatedCampaigns.cs | 16 + .../Response/PaginatedTransactionV2.cs | 18 + .../Response/PrivateMoney.cs | 5 +- .../Response/PrivateMoneySummary.cs | 22 + .../Response/Product.cs | 19 + .../Response/ShopWithAccounts.cs | 4 +- .../Response/ShopWithMetadata.cs | 4 +- .../Response/TransactionDetail.cs | 26 + 102 files changed, 8423 insertions(+), 1366 deletions(-) create mode 100644 src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestCreateCampaign.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestCreateCpmTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestCreateExternalTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestCreateUserAccount.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestDeleteAccount.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestGetCampaign.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestGetCpmToken.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneySummary.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestListCampaigns.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestListTransactionsV2.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestRefundExternalTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestUpdateCampaign.cs create mode 100644 src/PokepayPartnerCsharpSdk.Test/TestUpdateCustomerAccount.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/CreateCpmTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/CreateExternalTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/CreateUserAccount.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/DeleteAccount.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/GetCampaign.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/GetCpmToken.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/GetPrivateMoneySummary.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/ListCampaigns.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/ListTransactionsV2.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/RefundExternalTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/UpdateCampaign.cs create mode 100644 src/PokepayPartnerCsharpSdk/Request/UpdateCustomerAccount.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/AccountDeleted.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/Campaign.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/CpmToken.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/ExternalTransaction.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/PaginatedAccountDetails.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/PaginatedCampaigns.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/PaginatedTransactionV2.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/PrivateMoneySummary.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/Product.cs create mode 100644 src/PokepayPartnerCsharpSdk/Response/TransactionDetail.cs diff --git a/docs/index.md b/docs/index.md index e21c662..2624c62 100644 --- a/docs/index.md +++ b/docs/index.md @@ -173,14 +173,17 @@ try { ## API Operations +- [GetCpmToken](#get-cpm-token): CPMトークンの状態取得 - [ListTransactions](#list-transactions): 取引履歴を取得する - [CreateTransaction](#create-transaction): チャージする(廃止予定) +- [ListTransactionsV2](#list-transactions-v2): 取引履歴を取得する - [CreateTopupTransaction](#create-topup-transaction): チャージする - [CreatePaymentTransaction](#create-payment-transaction): 支払いする +- [CreateCpmTransaction](#create-cpm-transaction): CPMトークンによる取引作成 - [CreateTransferTransaction](#create-transfer-transaction): 個人間送金 - [CreateExchangeTransaction](#create-exchange-transaction): - [GetTransaction](#get-transaction): 取引情報を取得する -- [RefundTransaction](#refund-transaction): 返金する +- [RefundTransaction](#refund-transaction): 取引をキャンセルする - [ListTransfers](#list-transfers): - [CreateTopupTransactionWithCheck](#create-topup-transaction-with-check): チャージQRコードを読み取ることでチャージする - [ListBills](#list-bills): 支払いQRコード一覧を表示する @@ -192,8 +195,10 @@ try { - [UpdateCashtray](#update-cashtray): Cashtrayの情報を更新する - [GetAccount](#get-account): ウォレット情報を表示する - [UpdateAccount](#update-account): ウォレット情報を更新する +- [DeleteAccount](#delete-account): ウォレットを退会する - [ListAccountBalances](#list-account-balances): エンドユーザーの残高内訳を表示する - [ListAccountExpiredBalances](#list-account-expired-balances): エンドユーザーの失効済みの残高内訳を表示する +- [UpdateCustomerAccount](#update-customer-account): ウォレット情報を更新する - [GetCustomerAccounts](#get-customer-accounts): エンドユーザーのウォレット一覧を表示する - [CreateCustomerAccount](#create-customer-account): 新規エンドユーザーウォレットを追加する - [GetShopAccounts](#get-shop-accounts): 店舗ユーザーのウォレット一覧を表示する @@ -204,24 +209,55 @@ try { - [GetShop](#get-shop): 店舗情報を表示する - [UpdateShop](#update-shop): 店舗情報を更新する - [ListUserAccounts](#list-user-accounts): エンドユーザー、店舗ユーザーのウォレット一覧を表示する +- [CreateUserAccount](#create-user-account): エンドユーザーのウォレットを作成する - [GetPrivateMoneys](#get-private-moneys): マネー一覧を取得する - [GetPrivateMoneyOrganizationSummaries](#get-private-money-organization-summaries): 決済加盟店の取引サマリを取得する +- [GetPrivateMoneySummary](#get-private-money-summary): 取引サマリを取得する - [BulkCreateTransaction](#bulk-create-transaction): CSVファイル一括取引 +- [CreateExternalTransaction](#create-external-transaction): ポケペイ外部取引を作成する +- [RefundExternalTransaction](#refund-external-transaction): ポケペイ外部取引をキャンセルする +- [CreateCampaign](#create-campaign): ポイント付与キャンペーンを作る +- [ListCampaigns](#list-campaigns): キャンペーン一覧を取得する +- [GetCampaign](#get-campaign): キャンペーンを取得する +- [UpdateCampaign](#update-campaign): ポイント付与キャンペーンを更新する ### Transaction + +#### CPMトークンの状態取得 +CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。 +```csharp +Request.GetCpmToken request = new Request.GetCpmToken( + "fneXYRV1FBu9VqwmK2QWEk" // CPMトークン +); +Response.CpmToken response = await request.Send(client); +``` + +--- +`cpm_token` +```json +{ + "type": "string", + "minLength": 22, + "maxLength": 22 +} +``` +CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。 + +--- +成功したときは[CpmToken](#cpm-token)オブジェクトを返します #### 取引履歴を取得する 取引一覧を返します。 ```csharp Request.ListTransactions request = new Request.ListTransactions() { - From = "2017-05-10T09:01:07.000000+09:00", // 開始日時 - To = "2017-02-12T17:02:56.000000+09:00", // 終了日時 + From = "2017-04-13T00:30:31.000000+09:00", // 開始日時 + To = "2019-02-02T05:22:00.000000+09:00", // 終了日時 Page = 1, // ページ番号 PerPage = 50, // 1ページ分の取引数 ShopId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID CustomerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // エンドユーザーID CustomerName = "太郎", // エンドユーザー名 TerminalId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 端末ID - TransactionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 取引ID + TransactionId = "3Nf", // 取引ID OrganizationCode = "pocketchange", // 組織コード PrivateMoneyId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID IsModified = false, // キャンセルフラグ @@ -326,14 +362,11 @@ Response.PaginatedTransaction response = await request.Send(client); --- `transaction_id` ```json -{ - "type": "string", - "format": "uuid" -} +{ "type": "string" } ``` 取引IDです。 -フィルターとして使われ、指定された取引のみ一覧に表示されます。 +フィルターとして使われ、指定された取引IDに部分一致(前方一致)する取引のみが一覧に表示されます。 --- `organization_code` @@ -379,7 +412,8 @@ Response.PaginatedTransaction response = await request.Send(client); "type": "string", "enum": { "topup": "payment", - "exchange_outflow": "exchange_inflow" + "exchange_outflow": "exchange_inflow", + "cashback": "expire" } } } @@ -395,11 +429,17 @@ Response.PaginatedTransaction response = await request.Send(client); エンドユーザーから店舗への送金取引(支払い) 3. exchange-outflow -  他マネーへの流出 + 他マネーへの流出 4. exchange-inflow 他マネーからの流入 +5. cashback + 退会時返金取引 + +6. expire + 退会時失効取引 + --- `description` ```json @@ -423,12 +463,12 @@ Request.CreateTransaction request = new Request.CreateTransaction( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ) { - MoneyAmount = 5545, - PointAmount = 6708, - PointExpiresAt = "2024-02-06T11:02:52.000000+09:00", // ポイント有効期限 - Description = "CafuN856J50SdiADG37eydGENMPuSUGCPNHip0", + MoneyAmount = 5552, + PointAmount = 436, + PointExpiresAt = "2015-10-09T10:16:09.000000+09:00", // ポイント有効期限 + Description = "AeRoMBnYRrC4cXtKQ0a4OPrt", }; -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -443,7 +483,229 @@ Response.Transaction response = await request.Send(client); 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します + +#### 取引履歴を取得する +取引一覧を返します。 +```csharp +Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID +) { + OrganizationCode = "pocketchange", // 組織コード + ShopId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID + TerminalId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 端末ID + CustomerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // エンドユーザーID + CustomerName = "太郎", // エンドユーザー名 + Description = "店頭QRコードによる支払い", // 取引説明文 + TransactionId = "tro", // 取引ID + IsModified = false, // キャンセルフラグ + Types = new string[]{"topup", "payment"}, // 取引種別 (複数指定可)、チャージ=topup、支払い=payment + From = "2019-10-28T05:23:30.000000+09:00", // 開始日時 + To = "2019-04-04T18:54:33.000000+09:00", // 終了日時 + NextPageCursorId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 次のページへ遷移する際に起点となるtransactionのuuid + PrevPageCursorId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 前のページへ遷移する際に起点となるtransactionのuuid + PerPage = 50, // 1ページ分の取引数 +}; +Response.PaginatedTransactionV2 response = await request.Send(client); +``` + +--- +`private_money_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +マネーIDです。 + +指定したマネーでの取引が一覧に表示されます。 + +--- +`organization_code` +```json +{ + "type": "string", + "maxLength": 32, + "pattern": "^[a-zA-Z0-9-]*$" +} +``` +組織コードです。 + +フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。 + +--- +`shop_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +店舗IDです。 + +フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。 + +--- +`terminal_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +端末IDです。 + +フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。 + +--- +`customer_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +エンドユーザーIDです。 + +フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。 + +--- +`customer_name` +```json +{ + "type": "string", + "maxLength": 256 +} +``` +エンドユーザー名です。 + +フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。 + +--- +`description` +```json +{ + "type": "string", + "maxLength": 200 +} +``` +取引を指定の取引説明文でフィルターします。 + +取引説明文が完全一致する取引のみ抽出されます。取引説明文は最大200文字で記録されています。 + +--- +`transaction_id` +```json +{ "type": "string" } +``` +取引IDです。 + +フィルターとして使われ、指定された取引IDに部分一致(前方一致)する取引のみが一覧に表示されます。 + +--- +`is_modified` +```json +{ "type": "boolean" } +``` +キャンセルフラグです。 + +これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。 +デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。 + +--- +`types` +```json +{ + "type": "array", + "items": { + "type": "string", + "enum": [ "topup", "payment", "exchange_outflow", "exchange_inflow", "cashback" ] + } +} +``` +取引の種類でフィルターします。 + +以下の種類を指定できます。 + +1. topup + 店舗からエンドユーザーへの送金取引(チャージ) + +2. payment + エンドユーザーから店舗への送金取引(支払い) + +3. exchange-outflow + 他マネーへの流出 + +4. exchange-inflow + 他マネーからの流入 + +5. cashback + 退会時返金取引 + +--- +`from` +```json +{ + "type": "string", + "format": "date-time" +} +``` +抽出期間の開始日時です。 + +フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。 + +--- +`to` +```json +{ + "type": "string", + "format": "date-time" +} +``` +抽出期間の終了日時です。 + +フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。 + +--- +`next_page_cursor_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +次のページへ遷移する際に起点となるtransactionのuuid(前のページの末尾の要素のuuid)です。 + +prev_page_cursor_idのtransaction自体は次のページには含まれない。 + +--- +`prev_page_cursor_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +前のページへ遷移する際に起点となるtransactionのuuid(次のページの先頭の要素のuuid)です。 + +next_page_cursor_idのtransaction自体は前のページには含まれない。 + +--- +`per_page` +```json +{ + "type": "integer", + "minimum": 1, + "maximum": 1000 +} +``` +1ページ分の取引数です。 + +デフォルト値は50です。 + +--- +成功したときは[PaginatedTransactionV2](#paginated-transaction-v2)オブジェクトを返します #### チャージする チャージ取引を作成します。 @@ -454,13 +716,14 @@ Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID ) { BearPointShopId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // ポイント支払時の負担店舗ID - MoneyAmount = 7001.0, // マネー額 - PointAmount = 650.0, // ポイント額 - PointExpiresAt = "2018-05-18T16:46:21.000000+09:00", // ポイント有効期限 + MoneyAmount = 186, // マネー額 + PointAmount = 5581, // ポイント額 + PointExpiresAt = "2021-03-03T07:02:32.000000+09:00", // ポイント有効期限 Description = "初夏のチャージキャンペーン", // 取引履歴に表示する説明文 + Metadata = "{\"key\":\"value\"}", // 取引メタデータ RequestId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // リクエストID }; -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -515,25 +778,27 @@ Response.Transaction response = await request.Send(client); `money_amount` ```json { - "type": "number", + "type": "integer", "minimum": 0 } ``` マネー額です。 送金するマネー額を指定します。 +デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。 --- `point_amount` ```json { - "type": "number", + "type": "integer", "minimum": 0 } ``` ポイント額です。 送金するポイント額を指定します。 +デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。 --- `point_expires_at` @@ -558,6 +823,18 @@ Response.Transaction response = await request.Send(client); 任意入力で、取引履歴に表示される説明文です。 +--- +`metadata` +```json +{ + "type": "string", + "format": "json" +} +``` +取引作成時に指定されるメタデータです。 + +任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + --- `request_id` ```json @@ -573,7 +850,7 @@ Response.Transaction response = await request.Send(client); リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します #### 支払いする 支払取引を作成します。 @@ -584,12 +861,14 @@ Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // エンドユーザーID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID - 6244.0 // 支払い額 + 3923 // 支払い額 ) { Description = "たい焼き(小倉)", // 取引履歴に表示する説明文 + Metadata = "{\"key\":\"value\"}", // 取引メタデータ + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, // 商品情報データ RequestId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // リクエストID }; -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -632,7 +911,7 @@ Response.Transaction response = await request.Send(client); `amount` ```json { - "type": "number", + "type": "integer", "minimum": 0 } ``` @@ -652,6 +931,36 @@ Response.Transaction response = await request.Send(client); 任意入力で、取引履歴に表示される説明文です。 +--- +`metadata` +```json +{ + "type": "string", + "format": "json" +} +``` +取引作成時に指定されるメタデータです。 + +任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + +--- +`products` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +一つの取引に含まれる商品情報データです。 +以下の内容からなるJSONオブジェクトの配列で指定します。 + +- `jan_code`: JANコード。64字以下の文字列 +- `name`: 商品名。256字以下の文字列 +- `unit_price`: 商品単価。0以上の数値 +- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値 +- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean +- `other`: その他商品に関する情報。JSONオブジェクトで指定します。 + --- `request_id` ```json @@ -667,23 +976,135 @@ Response.Transaction response = await request.Send(client); リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します - -#### 個人間送金 -エンドユーザー間での送金取引(個人間送金)を作成します。 -個人間送金で送れるのはマネーのみで、ポイントを送ることはできません。送金元のマネー残高のうち、有効期限が最も遠いものから順に送金されます。 +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します + +#### CPMトークンによる取引作成 +CPMトークンにより取引を作成します。 +CPMトークンに設定されたスコープの取引を作ることができます。 ```csharp -Request.CreateTransferTransaction request = new Request.CreateTransferTransaction( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 送金元ユーザーID - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 受取ユーザーID - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID - 2754.0 // 送金額 +Request.CreateCpmTransaction request = new Request.CreateCpmTransaction( + "yWPQ4b5EvFhF0JaiWpiphX", // CPMトークン + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID + 1694.0 // 取引金額 ) { + Description = "たい焼き(小倉)", // 取引説明文 + Metadata = "{\"key\":\"value\"}", // 店舗側メタデータ + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, // 商品情報データ + RequestId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // リクエストID +}; +Response.TransactionDetail response = await request.Send(client); +``` + +--- +`cpm_token` +```json +{ + "type": "string", + "minLength": 22, + "maxLength": 22 +} +``` +エンドユーザーによって作られ、アプリなどに表示され、店舗に対して提示される22桁の文字列です。 + +エンドユーザーによって許可された取引のスコープを持っています。 + +--- +`shop_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +店舗IDです。 + +支払いやチャージを行う店舗を指定します。 + +--- +`amount` +```json +{ "type": "number" } +``` +取引金額を指定します。 + +正の値を与えるとチャージになり、負の値を与えると支払いとなります。 + +--- +`description` +```json +{ + "type": "string", + "maxLength": 200 +} +``` +取引説明文です。 + +エンドユーザーアプリの取引履歴などに表示されます。 + +--- +`metadata` +```json +{ + "type": "string", + "format": "json" +} +``` +取引作成時に店舗側から指定されるメタデータです。 + +任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + +--- +`products` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +一つの取引に含まれる商品情報データです。 +以下の内容からなるJSONオブジェクトの配列で指定します。 + +- `jan_code`: JANコード。64字以下の文字列 +- `name`: 商品名。256字以下の文字列 +- `unit_price`: 商品単価。0以上の数値 +- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値 +- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean +- `other`: その他商品に関する情報。JSONオブジェクトで指定します。 + +--- +`request_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +取引作成APIの羃等性を担保するためのリクエスト固有のIDです。 + +取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。 + +リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 + +--- +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します + +#### 個人間送金 +エンドユーザー間での送金取引(個人間送金)を作成します。 +個人間送金で送れるのはマネーのみで、ポイントを送ることはできません。送金元のマネー残高のうち、有効期限が最も遠いものから順に送金されます。 + +```csharp +Request.CreateTransferTransaction request = new Request.CreateTransferTransaction( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 送金元ユーザーID + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 受取ユーザーID + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID + 220.0 // 送金額 +) { + Metadata = "{\"key\":\"value\"}", // 取引メタデータ Description = "たい焼き(小倉)", // 取引履歴に表示する説明文 RequestId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // リクエストID }; -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -734,6 +1155,18 @@ Response.Transaction response = await request.Send(client); 送金するマネー額を指定します。 +--- +`metadata` +```json +{ + "type": "string", + "format": "json" +} +``` +取引作成時に指定されるメタデータです。 + +任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + --- `description` ```json @@ -761,7 +1194,7 @@ Response.Transaction response = await request.Send(client); リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します #### ```csharp @@ -769,12 +1202,12 @@ Request.CreateExchangeTransaction request = new Request.CreateExchangeTransactio "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - 7140.0 + 8552.0 ) { - Description = "Xe1sIjLSVztCspdpKcDGU85LATApzQ2dQG1XtK0UfX1fzmKZw4jAX5TdVMZA3FsBWHTaR7q8iHovbTWoPNbCUX3WmvU0lnYW7MWulxJqejEoXiemEzy22TP2wtSY9IoDSrJUA2sSTBsOwjVmr0", + Description = "5XFTYAHJdFeGZi1JIa9NTrkMeAKNU2qNMrw4Jay2YBOfulEIFK5T7Dc8oOst1MM9PmjRDk75J779k3qO5Tt2uQGKACRqDnzgekX1v8d", RequestId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // リクエストID }; -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -792,7 +1225,7 @@ Response.Transaction response = await request.Send(client); リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します #### 取引情報を取得する 取引を取得します。 @@ -800,7 +1233,7 @@ Response.Transaction response = await request.Send(client); Request.GetTransaction request = new Request.GetTransaction( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // 取引ID ); -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -816,35 +1249,42 @@ Response.Transaction response = await request.Send(client); フィルターとして使われ、指定した取引IDの取引を取得します。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します -#### 返金する +#### 取引をキャンセルする +取引IDを指定して取引をキャンセルします。 + +発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。 +キャンセル対象の取引に付随するポイント還元キャンペーンやクーポン適用も取り消されます。 + +チャージ取引のキャンセル時に返金すべき残高が足りないときは `account_balance_not_enough (422)` エラーが返ります。 +取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。 ```csharp Request.RefundTransaction request = new Request.RefundTransaction( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // 取引ID ) { Description = "返品対応のため", // 取引履歴に表示する返金事由 }; -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します #### ```csharp Request.ListTransfers request = new Request.ListTransfers() { - From = "2020-12-08T12:26:18.000000+09:00", - To = "2017-11-24T07:36:36.000000+09:00", - Page = 4740, - PerPage = 1712, + From = "2021-01-12T01:38:26.000000+09:00", + To = "2016-04-10T17:15:04.000000+09:00", + Page = 8261, + PerPage = 9551, ShopId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - ShopName = "79fqhITnnz7WaCAiQd9B8sle88sl7rSWKN9oQjHsNX48VkSyiuzE1L2wv36YuE4jwp0IiR44I5KLiOrRKq3qxtTGifN6KrraD5uojwDmQdLNOKHIlDiaOh78QfhNbZ3YfGhlbqaOElvScjtjkG1", + ShopName = "XLZhDHmMPohPl8jvZE0kmWyBRnvtcRhoAfyfPvqbgkbgVyEBxJxS2dp5fON6g3h5b1QYmVCtk78JxdSgtNZkgpDcQrvPvYu9rBGsdWvnLspaw0X1BOuUcrgAIrlVAxUxxoJ3m2cOYFN3fJYwkLiuasNI3TQ4Ubb8U4LoGEUFzMVQ4l9WdfwN1GBXrbSDIYZlYLOis5sBRV50E243Lt7Q0Ck", CustomerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - CustomerName = "WEjltqaYkhp7caXjUtBcNe9XyY4wthFo0glXBErIUB1p7aPMzXnAdDrY96Gn0OAQ9xSN0zfKx7ivixiVqjgvBNcsQLQxAtJm", + CustomerName = "QGlHLmFUomkHrvNClWFSWTgMn5wd60p6q", TransactionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", PrivateMoneyId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", IsModified = true, - TransactionTypes = new string[]{"transfer", "payment", "topup", "exchange"}, - TransferTypes = new string[]{"exchange", "payment", "campaign", "transfer"}, // 取引明細の種類でフィルターします。 + TransactionTypes = new string[]{"topup", "exchange"}, + TransferTypes = new string[]{"cashback", "transfer"}, // 取引明細の種類でフィルターします。 Description = "店頭QRコードによる支払い", // 取引詳細説明文 }; Response.PaginatedTransfers response = await request.Send(client); @@ -860,7 +1300,8 @@ Response.PaginatedTransfers response = await request.Send(client); "enum": { "topup": "payment", "exchange": "transfer", - "coupon": "campaign" + "coupon": "campaign", + "cashback": "expire" } } } @@ -884,6 +1325,12 @@ Response.PaginatedTransfers response = await request.Send(client); 5. coupon クーポンによる値引き処理、またはそのキャンセル取引 +6. cashback +退会時の返金取引 + +7. expire +退会時失効取引 + --- `description` ```json @@ -918,7 +1365,7 @@ Request.CreateTopupTransactionWithCheck request = new Request.CreateTopupTransac "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // チャージ用QRコードのID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // エンドユーザーのID ); -Response.Transaction response = await request.Send(client); +Response.TransactionDetail response = await request.Send(client); ``` --- @@ -946,7 +1393,7 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な 送金先のエンドユーザーを指定します。 --- -成功したときは[Transaction](#transaction)オブジェクトを返します +成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します ### Bill 支払いQRコード @@ -954,18 +1401,18 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な 支払いQRコード一覧を表示します。 ```csharp Request.ListBills request = new Request.ListBills() { - Page = 5974, // ページ番号 - PerPage = 4994, // 1ページの表示数 - BillId = "kNd3", // 支払いQRコードのID + Page = 4249, // ページ番号 + PerPage = 4903, // 1ページの表示数 + BillId = "mfQbT09L", // 支払いQRコードのID PrivateMoneyId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID - OrganizationCode = "jUp3-N--X92Fbs--D0fn--Hx6Q-zy1", // 組織コード + OrganizationCode = "-495StP-1oY-oK78LG2--9R-Xt-", // 組織コード Description = "test bill", // 取引説明文 - CreatedFrom = "2017-04-21T18:37:28.000000+09:00", // 作成日時(起点) - CreatedTo = "2021-05-08T05:36:00.000000+09:00", // 作成日時(終点) + CreatedFrom = "2018-01-11T22:40:16.000000+09:00", // 作成日時(起点) + CreatedTo = "2017-01-16T21:05:29.000000+09:00", // 作成日時(終点) ShopName = "bill test shop1", // 店舗名 ShopId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID - LowerLimitAmount = 6767, // 金額の範囲によるフィルタ(下限) - UpperLimitAmount = 2585, // 金額の範囲によるフィルタ(上限) + LowerLimitAmount = 1169, // 金額の範囲によるフィルタ(下限) + UpperLimitAmount = 6140, // 金額の範囲によるフィルタ(上限) IsDisabled = false, // 支払いQRコードが無効化されているかどうか }; Response.PaginatedBills response = await request.Send(client); @@ -1112,7 +1559,7 @@ Request.CreateBill request = new Request.CreateBill( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 支払いマネーのマネーID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // 支払い先(受け取り人)の店舗ID ) { - Amount = 8458.0, // 支払い額 + Amount = 2508.0, // 支払い額 Description = "test bill", // 説明文(アプリ上で取引の説明文として表示される) }; Response.Bill response = await request.Send(client); @@ -1138,7 +1585,7 @@ Response.Bill response = await request.Send(client); Request.UpdateBill request = new Request.UpdateBill( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // 支払いQRコードのID ) { - Amount = 45.0, // 支払い額 + Amount = 9810.0, // 支払い額 Description = "test bill", // 説明文 IsDisabled = false, // 無効化されているかどうか }; @@ -1204,10 +1651,10 @@ Cashtrayを作成します。 Request.CreateCashtray request = new Request.CreateCashtray( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ユーザーID - 6575.0 // 金額 + 1462.0 // 金額 ) { Description = "たい焼き(小倉)", // 取引履歴に表示する説明文 - ExpiresIn = 1228, // 失効時間(秒) + ExpiresIn = 7615, // 失効時間(秒) }; Response.Cashtray response = await request.Send(client); ``` @@ -1372,9 +1819,9 @@ Cashtrayの内容を更新します。bodyパラメーターは全て省略可 Request.UpdateCashtray request = new Request.UpdateCashtray( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // CashtrayのID ) { - Amount = 7001.0, // 金額 + Amount = 4279.0, // 金額 Description = "たい焼き(小倉)", // 取引履歴に表示する説明文 - ExpiresIn = 6822, // 失効時間(秒) + ExpiresIn = 7723, // 失効時間(秒) }; Response.Cashtray response = await request.Send(client); ``` @@ -1453,6 +1900,8 @@ Request.UpdateAccount request = new Request.UpdateAccount( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ウォレットID ) { IsSuspended = false, // ウォレットが凍結されているかどうか + Status = "pre-closed", // ウォレット状態 + CanTransferTopup = true, // チャージ可能かどうか }; Response.AccountDetail response = await request.Send(client); ``` @@ -1476,8 +1925,58 @@ Response.AccountDetail response = await request.Send(client); ``` ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。 +--- +`status` +```json +{ + "type": "string", + "enum": [ "active", "suspended", "pre-closed" ] +} +``` +ウォレットの状態です。 + +--- +`can_transfer_topup` +```json +{ "type": "boolean" } +``` +店舗ユーザーがエンドユーザーにチャージ可能かどうかです。真にするとチャージ可能となり、偽にするとチャージ不可能となります。 + --- 成功したときは[AccountDetail](#account-detail)オブジェクトを返します + +#### ウォレットを退会する +ウォレットを退会します。一度ウォレットを退会した後は、そのウォレットを再び利用可能な状態に戻すことは出来ません。 +```csharp +Request.DeleteAccount request = new Request.DeleteAccount( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ウォレットID +) { + Cashback = true, // 返金有無 +}; +Response.AccountDeleted response = await request.Send(client); +``` + +--- +`account_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +ウォレットIDです。 + +指定したウォレットIDのウォレットを退会します。 + +--- +`cashback` +```json +{ "type": "boolean" } +``` +退会時の返金有無です。エンドユーザに返金を行う場合、真を指定して下さい。現在のマネー残高を全て現金で返金したものとして記録されます。 + +--- +成功したときは[AccountDeleted](#account-deleted)オブジェクトを返します #### エンドユーザーの残高内訳を表示する エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。 @@ -1485,11 +1984,11 @@ Response.AccountDetail response = await request.Send(client); Request.ListAccountBalances request = new Request.ListAccountBalances( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ウォレットID ) { - Page = 2373, // ページ番号 - PerPage = 451, // 1ページ分の取引数 - ExpiresAtFrom = "2023-01-18T09:59:31.000000+09:00", // 有効期限の期間によるフィルター(開始時点) - ExpiresAtTo = "2016-09-25T04:41:30.000000+09:00", // 有効期限の期間によるフィルター(終了時点) - Direction = "asc", // 有効期限によるソート順序 + Page = 7385, // ページ番号 + PerPage = 5361, // 1ページ分の取引数 + ExpiresAtFrom = "2020-05-23T00:51:58.000000+09:00", // 有効期限の期間によるフィルター(開始時点) + ExpiresAtTo = "2020-06-15T23:21:04.000000+09:00", // 有効期限の期間によるフィルター(終了時点) + Direction = "desc", // 有効期限によるソート順序 }; Response.PaginatedAccountBalance response = await request.Send(client); ``` @@ -1565,11 +2064,11 @@ Response.PaginatedAccountBalance response = await request.Send(client); Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ウォレットID ) { - Page = 1228, // ページ番号 - PerPage = 7032, // 1ページ分の取引数 - ExpiresAtFrom = "2023-02-16T15:27:38.000000+09:00", // 有効期限の期間によるフィルター(開始時点) - ExpiresAtTo = "2025-04-18T14:51:29.000000+09:00", // 有効期限の期間によるフィルター(終了時点) - Direction = "asc", // 有効期限によるソート順序 + Page = 9875, // ページ番号 + PerPage = 8487, // 1ページ分の取引数 + ExpiresAtFrom = "2015-12-19T19:12:14.000000+09:00", // 有効期限の期間によるフィルター(開始時点) + ExpiresAtTo = "2023-10-27T08:07:27.000000+09:00", // 有効期限の期間によるフィルター(終了時点) + Direction = "desc", // 有効期限によるソート順序 }; Response.PaginatedAccountBalance response = await request.Send(client); ``` @@ -1638,6 +2137,64 @@ Response.PaginatedAccountBalance response = await request.Send(client); --- 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します + +#### ウォレット情報を更新する +ウォレットの状態を更新します。 +```csharp +Request.UpdateCustomerAccount request = new Request.UpdateCustomerAccount( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ウォレットID +) { + Status = "pre-closed", // ウォレット状態 + AccountName = "MHYRjzAZw05Ty0nenwzHOaIVwMTjPFMGevwVMeZt8EqIvyxvlj5KalqxA7HuqvdSNveWzWI5L6stQvZv", // アカウント名 + ExternalId = "RJLln3C", // 外部ID +}; +Response.AccountWithUser response = await request.Send(client); +``` + +--- +`account_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +ウォレットIDです。 + +指定したウォレットIDのウォレットの状態を更新します。 + +--- +`status` +```json +{ + "type": "string", + "enum": [ "active", "suspended", "pre-closed" ] +} +``` +ウォレットの状態です。 + +--- +`account_name` +```json +{ + "type": "string", + "maxLength": 256 +} +``` +変更するウォレット名です。 + +--- +`external_id` +```json +{ + "type": "string", + "maxLength": 50 +} +``` +変更する外部IDです。 + +--- +成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します #### エンドユーザーのウォレット一覧を表示する マネーを指定してエンドユーザーのウォレット一覧を取得します。 @@ -1645,14 +2202,15 @@ Response.PaginatedAccountBalance response = await request.Send(client); Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID ) { - Page = 4539, // ページ番号 - PerPage = 2772, // 1ページ分のウォレット数 - CreatedAtFrom = "2023-12-25T19:33:57.000000+09:00", // ウォレット作成日によるフィルター(開始時点) - CreatedAtTo = "2020-11-16T21:21:47.000000+09:00", // ウォレット作成日によるフィルター(終了時点) + Page = 5742, // ページ番号 + PerPage = 2513, // 1ページ分のウォレット数 + CreatedAtFrom = "2020-06-06T20:19:58.000000+09:00", // ウォレット作成日によるフィルター(開始時点) + CreatedAtTo = "2021-10-26T05:16:04.000000+09:00", // ウォレット作成日によるフィルター(終了時点) IsSuspended = true, // ウォレットが凍結状態かどうかでフィルターする - ExternalId = "vjsqVkcSInvOjFPIL9qlVM", // 外部ID - Tel = "07018335-9579", // エンドユーザーの電話番号 - Email = "805Swtsg2N@kJBD.com", // エンドユーザーのメールアドレス + Status = "pre-closed", // ウォレット状態 + ExternalId = "cH2xVBHTbiOHYbzW7EYCf76ToHcl8dtzcqD", // 外部ID + Tel = "0107-8624-579", // エンドユーザーの電話番号 + Email = "gHpZl8InHQ@BhMI.com", // エンドユーザーのメールアドレス }; Response.PaginatedAccountWithUsers response = await request.Send(client); ``` @@ -1716,6 +2274,16 @@ Response.PaginatedAccountWithUsers response = await request.Send(client); ``` このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。 +--- +`status` +```json +{ + "type": "string", + "enum": [ "active", "suspended", "pre-closed" ] +} +``` +このパラメータが指定されている場合、ウォレットの状態で結果がフィルターされます。デフォルトでは未指定です。 + --- `external_id` ```json @@ -1757,7 +2325,7 @@ Request.CreateCustomerAccount request = new Request.CreateCustomerAccount( ) { UserName = "ポケペイ太郎", // ユーザー名 AccountName = "ポケペイ太郎のアカウント", // アカウント名 - ExternalId = "WoqdLq3QmHRbZpwbP", // 外部ID + ExternalId = "rdZJT9MnQgGfElk", // 外部ID }; Response.AccountWithUser response = await request.Send(client); ``` @@ -1813,11 +2381,11 @@ PAPIクライアントシステムから利用するPokepayユーザーのIDで Request.GetShopAccounts request = new Request.GetShopAccounts( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID ) { - Page = 83, // ページ番号 - PerPage = 5866, // 1ページ分のウォレット数 - CreatedAtFrom = "2021-03-18T09:33:18.000000+09:00", // ウォレット作成日によるフィルター(開始時点) - CreatedAtTo = "2019-10-15T23:24:49.000000+09:00", // ウォレット作成日によるフィルター(終了時点) - IsSuspended = false, // ウォレットが凍結状態かどうかでフィルターする + Page = 724, // ページ番号 + PerPage = 5621, // 1ページ分のウォレット数 + CreatedAtFrom = "2023-06-06T12:17:12.000000+09:00", // ウォレット作成日によるフィルター(開始時点) + CreatedAtTo = "2019-12-06T00:26:46.000000+09:00", // ウォレット作成日によるフィルター(終了時点) + IsSuspended = true, // ウォレットが凍結状態かどうかでフィルターする }; Response.PaginatedAccountWithUsers response = await request.Send(client); ``` @@ -1892,10 +2460,10 @@ Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( ) { SenderCustomerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 送金エンドユーザーID ReceiverCustomerId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 受取エンドユーザーID - Type = "B6hajGJrCJ", // 取引種別、チャージ=topup、支払い=payment、個人間送金=transfer + Type = "payment", // 取引種別 IsModified = true, // キャンセル済みかどうか - From = "2019-02-13T12:10:46.000000+09:00", // 開始日時 - To = "2017-02-20T06:05:40.000000+09:00", // 終了日時 + From = "2020-04-03T15:24:56.000000+09:00", // 開始日時 + To = "2022-01-21T20:07:29.000000+09:00", // 終了日時 Page = 1, // ページ番号 PerPage = 50, // 1ページ分の取引数 }; @@ -1940,7 +2508,14 @@ Response.PaginatedTransaction response = await request.Send(client); --- `type` ```json -{ "type": "string" } +{ + "type": "string", + "enum": { + "topup": "payment", + "exchange": "transfer", + "cashback": "expire" + } +} ``` 取引の種類でフィルターします。 @@ -1954,6 +2529,10 @@ Response.PaginatedTransaction response = await request.Send(client); 他マネーへの流出(outflow)/他マネーからの流入(inflow) 4. transfer 個人間送金 +5. cashback + ウォレット退会時返金 +6. expire + ウォレット退会時失効 --- `is_modified` @@ -2021,11 +2600,11 @@ Request.ListShops request = new Request.ListShops() { OrganizationCode = "pocketchange", // 組織コード PrivateMoneyId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID Name = "oxスーパー三田店", // 店舗名 - PostalCode = "800-9576", // 店舗の郵便番号 + PostalCode = "520-4958", // 店舗の郵便番号 Address = "東京都港区芝...", // 店舗の住所 - Tel = "089682-5023", // 店舗の電話番号 - Email = "jlaztijN3v@ebjT.com", // 店舗のメールアドレス - ExternalId = "69RjYRPCqvnZ1YzdrhGH7XKNoGDpqqjY", // 店舗の外部ID + Tel = "0134-8133890", // 店舗の電話番号 + Email = "GMCke10fAp@KjBH.com", // 店舗のメールアドレス + ExternalId = "md", // 店舗の外部ID Page = 1, // ページ番号 PerPage = 50, // 1ページ分の取引数 }; @@ -2152,11 +2731,11 @@ Response.PaginatedShops response = await request.Send(client); Request.CreateShop request = new Request.CreateShop( "oxスーパー三田店" // 店舗名 ) { - ShopPostalCode = "5142087", // 店舗の郵便番号 + ShopPostalCode = "195-2891", // 店舗の郵便番号 ShopAddress = "東京都港区芝...", // 店舗の住所 - ShopTel = "0074-18354932", // 店舗の電話番号 - ShopEmail = "YdhYyR9ZtW@hMAK.com", // 店舗のメールアドレス - ShopExternalId = "ZHQ2Tjahc0hASAcEibjk", // 店舗の外部ID + ShopTel = "062940585", // 店舗の電話番号 + ShopEmail = "FqIXqzelGZ@DONU.com", // 店舗のメールアドレス + ShopExternalId = "AJfl2HMto7yaW0Gkt1pOBZosxcU6W1vF", // 店舗の外部ID OrganizationCode = "ox-supermarket", // 組織コード }; Response.User response = await request.Send(client); @@ -2168,14 +2747,14 @@ Response.User response = await request.Send(client); Request.CreateShopV2 request = new Request.CreateShopV2( "oxスーパー三田店" // 店舗名 ) { - PostalCode = "5184159", // 店舗の郵便番号 + PostalCode = "2790572", // 店舗の郵便番号 Address = "東京都港区芝...", // 店舗の住所 - Tel = "07-97912", // 店舗の電話番号 - Email = "FrkXVihIdQ@Wu7J.com", // 店舗のメールアドレス - ExternalId = "4NYirXryPP6taqbm6hsnA9hELka", // 店舗の外部ID + Tel = "0541-64397", // 店舗の電話番号 + Email = "pysg20fNhP@hFK8.com", // 店舗のメールアドレス + ExternalId = "wq4sfxVOVqIgogobrlTBvr", // 店舗の外部ID OrganizationCode = "ox-supermarket", // 組織コード - PrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗で有効にするマネーIDの配列 - CanTopupPrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗でチャージ可能にするマネーIDの配列 + PrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗で有効にするマネーIDの配列 + CanTopupPrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗でチャージ可能にするマネーIDの配列 }; Response.ShopWithAccounts response = await request.Send(client); ``` @@ -2249,13 +2828,13 @@ Request.UpdateShop request = new Request.UpdateShop( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // 店舗ユーザーID ) { Name = "oxスーパー三田店", // 店舗名 - PostalCode = "376-2080", // 店舗の郵便番号 + PostalCode = "5998063", // 店舗の郵便番号 Address = "東京都港区芝...", // 店舗の住所 - Tel = "041115489", // 店舗の電話番号 - Email = "VIgVP7fIz1@xemn.com", // 店舗のメールアドレス - ExternalId = "x9P7H", // 店舗の外部ID - PrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗で有効にするマネーIDの配列 - CanTopupPrivateMoneyIds = new string[]{}, // 店舗でチャージ可能にするマネーIDの配列 + Tel = "07-8413881", // 店舗の電話番号 + Email = "tPEmOFzye1@0sMn.com", // 店舗のメールアドレス + ExternalId = "1hLqgZ4Scflk2", // 店舗の外部ID + PrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗で有効にするマネーIDの配列 + CanTopupPrivateMoneyIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // 店舗でチャージ可能にするマネーIDの配列 }; Response.ShopWithAccounts response = await request.Send(client); ``` @@ -2357,8 +2936,11 @@ Response.ShopWithAccounts response = await request.Send(client); ```csharp Request.ListUserAccounts request = new Request.ListUserAccounts( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ユーザーID -); -Response.PaginatedAccounts response = await request.Send(client); +) { + Page = 1643, // ページ番号 + PerPage = 402, // 1ページ分の取引数 +}; +Response.PaginatedAccountDetails response = await request.Send(client); ``` --- @@ -2374,7 +2956,64 @@ Response.PaginatedAccounts response = await request.Send(client); 指定したユーザーIDのウォレット一覧を取得します。パートナーキーと紐づく組織が発行しているマネーのウォレットのみが表示されます。 --- -成功したときは[PaginatedAccounts](#paginated-accounts)オブジェクトを返します +`page` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +取得したいページ番号です。デフォルト値は1です。 + +--- +`per_page` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +1ページ当たりのウォレット数です。デフォルト値は50です。 + +--- +成功したときは[PaginatedAccountDetails](#paginated-account-details)オブジェクトを返します + +#### エンドユーザーのウォレットを作成する +```csharp +Request.CreateUserAccount request = new Request.CreateUserAccount( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // ユーザーID + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID +) { + Name = "jOojFztUyYyUwwyS9B5htgNIDpUpzKyj3BEvYp1TbuySIy9vMfjs9RSVIuRLJamUgod9vJRMh5laf7AaoLGt4pe6BC2Sel2QniqdOC9my1YOO8CjR0YFmv40UM5wZgue67e0YlrO8E3L7gW6pVOxZ4jRFNa6hoBOihdHvejLf7HUNUhMpEnczyOhMWAPbHXytdjUT8FkE6WXDem2rgSzz35aQ4D94kR9S0XTdmHcC0cGFAf", // ウォレット名 + ExternalId = "EKgLlOIWqFFofKhzWzC", // 外部ID +}; +Response.AccountDetail response = await request.Send(client); +``` + +--- +`user_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +ユーザーIDです。 + +--- +`private_money_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +マネーIDです。 + +作成するウォレットのマネーを指定します。このパラメータは必須です。 + +--- +成功したときは[AccountDetail](#account-detail)オブジェクトを返します ### Private Money #### マネー一覧を取得する @@ -2409,8 +3048,8 @@ Response.PaginatedPrivateMoneys response = await request.Send(client); Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID ) { - From = "2016-05-21T23:00:33.000000+09:00", // 開始日時(toと同時に指定する必要有) - To = "2021-05-24T13:34:12.000000+09:00", // 終了日時(fromと同時に指定する必要有) + From = "2022-06-06T23:07:50.000000+09:00", // 開始日時(toと同時に指定する必要有) + To = "2022-11-14T13:22:58.000000+09:00", // 終了日時(fromと同時に指定する必要有) Page = 1, // ページ番号 PerPage = 50, // 1ページ分の取引数 }; @@ -2419,17 +3058,29 @@ Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Sen `from`と`to`は同時に指定する必要があります。 成功したときは[PaginatedPrivateMoneyOrganizationSummaries](#paginated-private-money-organization-summaries)オブジェクトを返します + +#### 取引サマリを取得する +```csharp +Request.GetPrivateMoneySummary request = new Request.GetPrivateMoneySummary( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID +) { + From = "2021-02-01T04:36:10.000000+09:00", // 開始日時 + To = "2024-04-18T16:52:04.000000+09:00", // 終了日時 +}; +Response.PrivateMoneySummary response = await request.Send(client); +``` +成功したときは[PrivateMoneySummary](#private-money-summary)オブジェクトを返します ### Bulk #### CSVファイル一括取引 CSVファイルから一括取引をします。 ```csharp Request.BulkCreateTransaction request = new Request.BulkCreateTransaction( - "lwWZKuWWf4n5wNPq2rjN28", // 一括取引タスク名 - "QfQLnQ9Qr", // 取引する情報のCSV - "2gs4rAyEVt2ws7WkJzpgGUX4mtxobZ9ZCpNJ" // リクエストID + "nh", // 一括取引タスク名 + "L16", // 取引する情報のCSV + "oNA3cZ4NnyIEjaN6dYZY4p9bZgscBV3pXiPP" // リクエストID ) { - Description = "ZG6LzTWIbd8ZNVrafdiivNn4NbNLXIdoiqtrelImUNmLeKEfXUc2dQExu22E4bXnTsrAuXzc", // 一括取引の説明 + Description = "iW2qUm4FbQucsmz0GYwY85K8kF9CcO2FCZ7wQECuEigH9T54l9EXWThBhNBtq0Hlr5VUDcRjPWhcWE5Ed0Dp6qm5enNIYlp4WuULLQB3hzZG357PPnWlMQlOO65IFrI", // 一括取引の説明 }; Response.BulkTransaction response = await request.Send(client); ``` @@ -2495,17 +3146,979 @@ Response.BulkTransaction response = await request.Send(client); --- 成功したときは[BulkTransaction](#bulk-transaction)オブジェクトを返します -## Responses +### Event + +#### ポケペイ外部取引を作成する +ポケペイ外部取引を作成します。 +ポケペイ外の現金決済やクレジットカード決済に対してポケペイのポイントを付けたいというときに使用します。 - -## AccountWithUser -* `Id (string)`: -* `Name (string)`: -* `IsSuspended (bool)`: +```csharp +Request.CreateExternalTransaction request = new Request.CreateExternalTransaction( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // エンドユーザーID + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID + 433 // 取引額 +) { + Description = "たい焼き(小倉)", // 取引説明文 + Metadata = "{\"key\":\"value\"}", // ポケペイ外部取引メタデータ + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, // 商品情報データ + RequestId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // リクエストID +}; +Response.ExternalTransaction response = await request.Send(client); +``` + +--- +`shop_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +店舗IDです。 + +ポケペイ外部取引が行なう店舗を指定します。 + +--- +`customer_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +エンドユーザーIDです。 + +エンドユーザーを指定します。 + +--- +`private_money_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +マネーIDです。 + +マネーを指定します。 + +--- +`amount` +```json +{ + "type": "integer", + "minimum": 0 +} +``` +取引金額です。 + +--- +`description` +```json +{ + "type": "string", + "maxLength": 200 +} +``` +取引説明文です。 + +任意入力で、取引履歴に表示される説明文です。 + +--- +`metadata` +```json +{ + "type": "string", + "format": "json" +} +``` +ポケペイ外部取引作成時に指定され、取引と紐付けられるメタデータです。 + +任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSONで指定します。 + +--- +`products` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +一つの取引に含まれる商品情報データです。 +以下の内容からなるJSONオブジェクトの配列で指定します。 + +- `jan_code`: JANコード。64字以下の文字列 +- `name`: 商品名。256字以下の文字列 +- `unit_price`: 商品単価。0以上の数値 +- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値 +- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean +- `other`: その他商品に関する情報。JSONオブジェクトで指定します。 + +--- +`request_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +取引作成APIの羃等性を担保するためのリクエスト固有のIDです。 + +取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。 + +リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 + +--- +成功したときは[ExternalTransaction](#external-transaction)オブジェクトを返します + +#### ポケペイ外部取引をキャンセルする +取引IDを指定して取引をキャンセルします。 + +発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。 +キャンセル対象のポケペイ外部取引に付随するポイント還元キャンペーンも取り消されます。 + +取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。 +```csharp +Request.RefundExternalTransaction request = new Request.RefundExternalTransaction( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // 取引ID +) { + Description = "返品対応のため", // 取引履歴に表示する返金事由 +}; +Response.ExternalTransaction response = await request.Send(client); +``` +成功したときは[ExternalTransaction](#external-transaction)オブジェクトを返します +### Campaign + +#### ポイント付与キャンペーンを作る +ポイント付与キャンペーンを作成します。 + +```csharp +Request.CreateCampaign request = new Request.CreateCampaign( + "JMiWPv5dAbUBWta68v79KNgsodWT1kP64chZLEzZTeXAsCUOeSILicKJugPMhkbNW44x5lpizelx6Zw3ANkreMSnigb4Yb3t6kmvyhjD7Y1lgzqIh5MLpUpAeuRnJqWXlTPA3BNnPJo0CH10GQb96Jzcef7f3He1f0QYEkgJnc3iiJ3NDVFkNizSfk2HEbXxayx", // キャンペーン名 + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID + "2017-08-06T14:18:51.000000+09:00", // キャンペーン開始日時 + "2015-12-06T10:06:06.000000+09:00", // キャンペーン終了日時 + 4786, // キャンペーンの適用優先度 + "payment" // イベント種別 +) { + BearPointShopId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // ポイント負担先店舗ID + Description = "ghdc2Ljaj2GsuiV9UsDnl2m8nhmhWmlD5AgJ4dO8VEt3hyN01xWKpyfSJX1OiNUbqHXuSEWeM8VLmM8qznKIn9uBoqN3XKkwmXFn", // キャンペーンの説明文 + Status = "enabled", // キャンペーン作成時の状態 + PointExpiresAt = "2020-11-24T15:21:52.000000+09:00", // ポイント有効期限(絶対日時指定) + PointExpiresInDays = 7501, // ポイント有効期限(相対日数指定) + IsExclusive = true, // キャンペーンの重複設定 + Subject = "money", // ポイント付与の対象金額の種別 + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, // 取引金額ベースのポイント付与ルール + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, // 商品情報ベースのポイント付与ルール + ApplicableDaysOfWeek = new int[]{3, 5, 2}, // キャンペーンを適用する曜日 (複数指定) + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, // キャンペーンを適用する時間帯 (複数指定) + ApplicableShopIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // キャンペーン適用対象となる店舗IDのリスト + MinimumNumberForCombinationPurchase = 7978, // 複数種類の商品を同時購入するときの商品種別数の下限 + DestPrivateMoneyId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // ポイント付与先となるマネーID +}; +Response.Campaign response = await request.Send(client); +``` + +--- +`name` +```json +{ + "type": "string", + "maxLength": 256 +} +``` +キャンペーン名です(必須項目)。 + +ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。 + +--- +`private_money_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +キャンペーン対象のマネーのIDです(必須項目)。 + +--- +`starts_at` +```json +{ + "type": "string", + "format": "date-time" +} +``` +キャンペーン開始日時です(必須項目)。 +キャンペーン期間中のみポイントが付与されます。 +開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + +--- +`ends_at` +```json +{ + "type": "string", + "format": "date-time" +} +``` +キャンペーン終了日時です(必須項目)。 +キャンペーン期間中のみポイントが付与されます。 +開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + +--- +`priority` +```json +{ "type": "integer" } +``` +キャンペーンの適用優先度です。 + +優先度が大きいものから順に適用判定されていきます。 +キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。 + +--- +`event` +```json +{ + "type": "string", + "enum": [ "topup", "payment", "external-transaction" ] +} +``` +キャンペーンのトリガーとなるイベントの種類を指定します(必須項目)。 + +以下のいずれかを指定できます。 + +1. topup + 店舗からエンドユーザーへの送金取引(チャージ) +2. payment + エンドユーザーから店舗への送金取引(支払い) +3. external-transaction + ポケペイ外の取引(現金決済など) + +--- +`bear_point_shop_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +ポイントを負担する店舗のIDです。デフォルトではマネー発行体の本店が設定されます。 +ポイント負担先店舗は後から更新することはできません。 + +--- +`description` +```json +{ + "type": "string", + "maxLength": 200 +} +``` +キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。 + +--- +`status` +```json +{ + "type": "string", + "enum": { "enabled": "disabled" } +} +``` +キャンペーン作成時の状態を指定します。デフォルトではenabledです。 + +以下のいずれかを指定できます。 + +1. enabled + 有効 +2. disabled + 無効 + +--- +`point_expires_at` +```json +{ + "type": "string", + "format": "date-time" +} +``` +キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。 +省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + +--- +`point_expires_in_days` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。 +省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + +--- +`is_exclusive` +```json +{ "type": "boolean" } +``` +キャンペーンの重ね掛けを行うかどうかのフラグです。 + +これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。 +falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。 + +--- +`subject` +```json +{ + "type": "string", + "enum": { "money": "all" } +} +``` +ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。 +eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。 + +以下のいずれかを指定できます。 + +1. money +moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします + +2. all +all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む) +注意: event を topup にしたときはポイントの付与に対しても適用されます + +--- +`amount_based_point_rules` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +金額をベースとしてポイント付与を行うルールを指定します。 +amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 +各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。 + +例: +```javascript +[ + // 1000円以上、5000円未満の決済には 5% + { + "point_amount": 5, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 1000, + "subject_less_than": 5000 + }, + // 5000円以上の決済には 10% + { + "point_amount": 10, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 5000 + }, +] +``` + +--- +`product_based_point_rules` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +商品情報をベースとしてポイント付与を行うルールを指定します。 +ルールは商品ごとに設定可能で、ルールの配列として指定します。 +amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 +event が payment か external-transaction の時のみ有効です。 +各ルールの順序は問わず、適用可能なものは全て適用されます。 +一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。 + +例: +```javascript +[ + // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + }, + // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + "is_multiply_by_count": true, + }, + // 対象商品を2つ以上購入したら500ポイント付与(固定額付与) + { + "point_amount": 500, + "point_amount_unit": "absolute", + "product_code": "4912345678904", + "required_count": 2 + }, + // 書籍は10%ポイント付与 + // ※ISBNの形式はレジがポケペイに送信する形式に準じます + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-%", + }, + // 一部の出版社の書籍は10%ポイント付与 + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-4-01-%", // 旺文社 + } +] +``` + +--- +`minimum_number_for_combination_purchase` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。デフォルトでは未指定で、指定する場合は1以上の整数を指定します。 + +このパラメータを指定するときは product_based_point_rules で商品毎のルールが指定されている必要があります。 +例えば、A商品とB商品とC商品のうち、キャンペーンの発火のために2商品以上が同時購入される必要があるときは 2 を指定します。 + +例1: 商品A, Bが同時購入されたときに固定ポイント額(200ポイント)付与 +```javascript +{ + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード" + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード" + } + ] +} +``` + +例2: 商品A, Bが3個ずつ以上同時購入されたときに固定ポイント額(200ポイント)付与 +```javascript +{ + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード", + "required_count": 3 + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード", + "required_count": 3 + } + ] +} +``` + +例2: 商品A, B, Cのうち2商品以上が同時購入されたときに総額の10%ポイントが付与 +```javascript +{ + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Aの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Bの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Cの商品コード", + "is_multiply_by_count": true, + } + ] +} +``` + +--- +`dest_private_money_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +キャンペーンを駆動するイベントのマネーとは「別のマネー」に対してポイントを付けたいときに、そのマネーIDを指定します。 + +ポイント付与先のマネーはキャンペーンを駆動するイベントのマネーと同一発行体が発行しているものに限ります。その他のマネーIDが指定された場合は private_money_not_found (422) が返ります。 +エンドユーザー、店舗、ポイント負担先店舗はポイント付与先マネーのウォレットを持っている必要があります。持っていない場合はポイントは付きません。 +元のイベントのマネーと異なる複数のマネーに対して同時にポイントを付与することはできません。重複可能に設定されている複数のキャンペーンで別々のポイント付与先マネーを指定した場合は最も優先度の高いものが処理され、残りは無視されます。 +キャンペーンのポイント付与先マネーは後から更新することはできません。 +デフォルトではポイント付与先はキャンペーンを駆動するイベントのマネー(private_money_idで指定したマネー)になります。 + +別マネーに対するポイント付与は別のtransactionとなります。 RefundTransaction で元のイベントをキャンセルしたときはポイント付与のtransactionもキャンセルされ、逆にポイント付与のtransactionをキャンセルしたときは連動して元のイベントがキャンセルされます。 + +--- +成功したときは[Campaign](#campaign)オブジェクトを返します + +#### キャンペーン一覧を取得する +マネーIDを指定してキャンペーンを取得します。 +発行体の組織マネージャ権限で、自組織が発行するマネーのキャンペーンについてのみ閲覧可能です。 +閲覧権限がない場合は unpermitted_admin_user エラー(422)が返ります。 +```csharp +Request.ListCampaigns request = new Request.ListCampaigns( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // マネーID +) { + IsOngoing = false, // 現在適用可能なキャンペーンかどうか + Page = 1, // ページ番号 + PerPage = 50, // 1ページ分の取得数 +}; +Response.PaginatedCampaigns response = await request.Send(client); +``` + +--- +`private_money_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +マネーIDです。 + +フィルターとして使われ、指定したマネーでのキャンペーンのみ一覧に表示されます。 + +--- +`is_ongoing` +```json +{ "type": "boolean" } +``` +有効化されており、現在キャンペーン期間内にあるキャンペーンをフィルターするために使われます。 +真であれば適用可能なもののみを抽出し、偽であれば適用不可なもののみを抽出します。 +デフォルトでは未指定(フィルターなし)です。 + +--- +`page` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +取得したいページ番号です。 + +--- +`per_page` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +1ページ分の取得数です。デフォルトでは 20 になっています。 + +--- +成功したときは[PaginatedCampaigns](#paginated-campaigns)オブジェクトを返します + +#### キャンペーンを取得する +IDを指定してキャンペーンを取得します。 +発行体の組織マネージャ権限で、自組織が発行するマネーのキャンペーンについてのみ閲覧可能です。 +閲覧権限がない場合は unpermitted_admin_user エラー(422)が返ります。 +```csharp +Request.GetCampaign request = new Request.GetCampaign( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // キャンペーンID +); +Response.Campaign response = await request.Send(client); +``` + +--- +`campaign_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +キャンペーンIDです。 + +指定したIDのキャンペーンを取得します。存在しないIDを指定した場合は404エラー(NotFound)が返ります。 + +--- +成功したときは[Campaign](#campaign)オブジェクトを返します + +#### ポイント付与キャンペーンを更新する +ポイント付与キャンペーンを更新します。 + +```csharp +Request.UpdateCampaign request = new Request.UpdateCampaign( + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // キャンペーンID +) { + Name = "rucmF8n8VnjFoEs5f64mvXKC0yIYDrOmfZvcfCdES8", // キャンペーン名 + StartsAt = "2024-09-08T07:20:09.000000+09:00", // キャンペーン開始日時 + EndsAt = "2023-12-27T18:14:31.000000+09:00", // キャンペーン終了日時 + Priority = 9546, // キャンペーンの適用優先度 + Event = "payment", // イベント種別 + Description = "f50TC5y2HNrP34hD1uxIbudPgKcAH4LqtvnYdJrsgVxWy0PirB5ccKSjPsnaJy0xSUaUZ3KYipGveNp11WiSr08uCzB0JSt7h", // キャンペーンの説明文 + Status = "disabled", // キャンペーン作成時の状態 + PointExpiresAt = "2024-11-12T03:49:54.000000+09:00", // ポイント有効期限(絶対日時指定) + PointExpiresInDays = 7854, // ポイント有効期限(相対日数指定) + IsExclusive = true, // キャンペーンの重複設定 + Subject = "money", // ポイント付与の対象金額の種別 + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, // 取引金額ベースのポイント付与ルール + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, // 商品情報ベースのポイント付与ルール + ApplicableDaysOfWeek = new int[]{2, 1}, // キャンペーンを適用する曜日 (複数指定) + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, // キャンペーンを適用する時間帯 (複数指定) + ApplicableShopIds = new string[]{"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, // キャンペーン適用対象となる店舗IDのリスト + MinimumNumberForCombinationPurchase = 7273, // 複数種類の商品を同時購入するときの商品種別数の下限 +}; +Response.Campaign response = await request.Send(client); +``` + +--- +`campaign_id` +```json +{ + "type": "string", + "format": "uuid" +} +``` +キャンペーンIDです。 + +指定したIDのキャンペーンを更新します。存在しないIDを指定した場合は404エラー(NotFound)が返ります。 + +--- +`name` +```json +{ + "type": "string", + "maxLength": 256 +} +``` +キャンペーン名です。 + +ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。 + +--- +`starts_at` +```json +{ + "type": "string", + "format": "date-time" +} +``` +キャンペーン開始日時です。 +キャンペーン期間中のみポイントが付与されます。 +開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + +--- +`ends_at` +```json +{ + "type": "string", + "format": "date-time" +} +``` +キャンペーン終了日時です。 +キャンペーン期間中のみポイントが付与されます。 +開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + +--- +`priority` +```json +{ "type": "integer" } +``` +キャンペーンの適用優先度です。 + +優先度が大きいものから順に適用判定されていきます。 +キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。 + +--- +`event` +```json +{ + "type": "string", + "enum": [ "topup", "payment", "external-transaction" ] +} +``` +キャンペーンのトリガーとなるイベントの種類を指定します。 + +以下のいずれかを指定できます。 + +1. topup + 店舗からエンドユーザーへの送金取引(チャージ) +2. payment + エンドユーザーから店舗への送金取引(支払い) +3. external-transaction + ポケペイ外の取引(現金決済など) + +--- +`description` +```json +{ + "type": "string", + "maxLength": 200 +} +``` +キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。 + +--- +`status` +```json +{ + "type": "string", + "enum": { "enabled": "disabled" } +} +``` +キャンペーン作成時の状態を指定します。デフォルトではenabledです。 + +以下のいずれかを指定できます。 + +1. enabled + 有効 +2. disabled + 無効 + +--- +`point_expires_at` +```json +{ + "type": "string", + "format": "date-time" +} +``` +キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。 +省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + +--- +`point_expires_in_days` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。 +省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + +--- +`is_exclusive` +```json +{ "type": "boolean" } +``` +キャンペーンの重ね掛けを行うかどうかのフラグです。 + +これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。 +falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。 + +--- +`subject` +```json +{ + "type": "string", + "enum": { "money": "all" } +} +``` +ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。 +eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。 + +以下のいずれかを指定できます。 + +1. money +moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします + +2. all +all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む) +注意: event を topup にしたときはポイントの付与に対しても適用されます + +--- +`amount_based_point_rules` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +金額をベースとしてポイント付与を行うルールを指定します。 +amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 +各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。 + +例: +```javascript +[ + // 1000円以上、5000円未満の決済には 5% + { + "point_amount": 5, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 1000, + "subject_less_than": 5000 + }, + // 5000円以上の決済には 10% + { + "point_amount": 10, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 5000 + }, +] +``` + +--- +`product_based_point_rules` +```json +{ + "type": "array", + "items": { "type": "object" } +} +``` +商品情報をベースとしてポイント付与を行うルールを指定します。 +ルールは商品ごとに設定可能で、ルールの配列として指定します。 +amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 +event が payment か external-transaction の時のみ有効です。 +各ルールの順序は問わず、適用可能なものは全て適用されます。 +一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。 + +例: +```javascript +[ + // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + }, + // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + "is_multiply_by_count": true, + }, + // 対象商品を2つ以上購入したら500ポイント付与(固定額付与) + { + "point_amount": 500, + "point_amount_unit": absolute", + "product_code": "4912345678904", + "required_count": 2 + }, + // 書籍は10%ポイント付与 + // ※ISBNの形式はレジがポケペイに送信する形式に準じます + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-%", + }, + // 一部の出版社の書籍は10%ポイント付与 + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-4-01-%", // 旺文社 + } +] +``` + +--- +`minimum_number_for_combination_purchase` +```json +{ + "type": "integer", + "minimum": 1 +} +``` +複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。 + +このパラメータを指定するときは product_based_point_rules で商品毎のルールが指定されている必要があります。 +例えば、A商品とB商品とC商品のうち、キャンペーンの発火のために2商品以上が同時購入される必要があるときは 2 を指定します。 + +例1: 商品A, Bが同時購入されたときに固定ポイント額(200ポイント)付与 +```javascript +{ + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード" + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード" + } + ] +} +``` + +例2: 商品A, Bが3個ずつ以上同時購入されたときに固定ポイント額(200ポイント)付与 +```javascript +{ + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード", + "required_count": 3 + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード", + "required_count": 3 + } + ] +} +``` + +例2: 商品A, B, Cのうち2商品以上が同時購入されたときに総額の10%ポイントが付与 +```javascript +{ + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Aの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Bの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Cの商品コード", + "is_multiply_by_count": true, + } + ] +} +``` + +--- +成功したときは[Campaign](#campaign)オブジェクトを返します +## Responses + + + +## AccountWithUser +* `Id (string)`: +* `Name (string)`: +* `IsSuspended (bool)`: +* `Status (string)`: * `PrivateMoney (PrivateMoney)`: * `User (User)`: -* `ExternalId (string)`: `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。 @@ -2516,13 +4129,21 @@ Response.BulkTransaction response = await request.Send(client); * `Id (string)`: * `Name (string)`: * `IsSuspended (bool)`: +* `Status (string)`: * `Balance (double)`: * `MoneyBalance (double)`: * `PointBalance (double)`: * `PrivateMoney (PrivateMoney)`: +* `User (User)`: +* `ExternalId (string)`: `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。 +`user`は [User](#user) オブジェクトを返します。 + + +## AccountDeleted + ## Bill * `Id (string)`: 支払いQRコードのID @@ -2536,6 +4157,22 @@ Response.BulkTransaction response = await request.Send(client); `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。 + +## CpmToken +* `CpmToken (string)`: +* `Account (AccountDetail)`: +* `Transaction (Transaction)`: +* `Event (ExternalTransaction)`: +* `Scopes (string[])`: 許可された取引種別 +* `ExpiresAt (string)`: CPMトークンの失効日時 +* `Metadata (string)`: エンドユーザー側メタデータ + +`account`は [AccountDetail](#account-detail) オブジェクトを返します。 + +`transaction`は [Transaction](#transaction) オブジェクトを返します。 + +`event`は [ExternalTransaction](#external-transaction) オブジェクトを返します。 + ## Cashtray * `Id (string)`: Cashtray自体のIDです。 @@ -2572,8 +4209,8 @@ Response.BulkTransaction response = await request.Send(client); * `Name (string)`: ユーザー (または店舗) 名 * `IsMerchant (bool)`: 店舗ユーザーかどうか - -## Transaction + +## TransactionDetail * `Id (string)`: 取引ID * `Type (string)`: 取引種別 (チャージ=topup, 支払い=payment) * `IsModified (bool)`: 返金された取引かどうか @@ -2586,11 +4223,14 @@ Response.BulkTransaction response = await request.Send(client); * `PointAmount (double)`: 決済ポイント額 * `DoneAt (string)`: 取引日時 * `Description (string)`: 取引説明文 +* `Transfers (Transfer[])`: `receiver`と`sender`は [User](#user) オブジェクトを返します。 `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。 +`transfers`は [Transfer](#transfer) オブジェクトの配列を返します。 + ## ShopWithAccounts * `Id (string)`: 店舗ID @@ -2617,6 +4257,22 @@ Response.BulkTransaction response = await request.Send(client); * `SubmittedAt (string)`: バルク取引が登録された日時 * `UpdatedAt (string)`: バルク取引が更新された日時 + +## ExternalTransaction +* `Id (string)`: ポケペイ外部取引ID +* `IsModified (bool)`: 返金された取引かどうか +* `Sender (User)`: 送金者情報 +* `SenderAccount (Account)`: 送金ウォレット情報 +* `Receiver (User)`: 受取者情報 +* `ReceiverAccount (Account)`: 受取ウォレット情報 +* `Amount (double)`: 決済額 +* `DoneAt (string)`: 取引日時 +* `Description (string)`: 取引説明文 + +`receiver`と`sender`は [User](#user) オブジェクトを返します。 + +`receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。 + ## PaginatedPrivateMoneyOrganizationSummaries * `Rows (PrivateMoneyOrganizationSummary[])`: @@ -2627,6 +4283,18 @@ Response.BulkTransaction response = await request.Send(client); `pagination`は [Pagination](#pagination) オブジェクトを返します。 + +## PrivateMoneySummary +* `TopupAmount (double)`: +* `RefundedTopupAmount (double)`: +* `PaymentAmount (double)`: +* `RefundedPaymentAmount (double)`: +* `AddedPointAmount (double)`: +* `RefundedAddedPointAmount (double)`: +* `ExchangeInflowAmount (double)`: +* `ExchangeOutflowAmount (double)`: +* `TransactionCount (int)`: + ## PaginatedTransaction * `Rows (Transaction[])`: @@ -2637,6 +4305,16 @@ Response.BulkTransaction response = await request.Send(client); `pagination`は [Pagination](#pagination) オブジェクトを返します。 + +## PaginatedTransactionV2 +* `Rows (Transaction[])`: +* `PerPage (int)`: +* `Count (int)`: +* `NextPageCursorId (string)`: +* `PrevPageCursorId (string)`: + +`rows`は [Transaction](#transaction) オブジェクトの配列を返します。 + ## PaginatedTransfers * `Rows (Transfer[])`: @@ -2647,23 +4325,23 @@ Response.BulkTransaction response = await request.Send(client); `pagination`は [Pagination](#pagination) オブジェクトを返します。 - -## PaginatedAccounts -* `Rows (Account[])`: + +## PaginatedAccountWithUsers +* `Rows (AccountWithUser[])`: * `Count (int)`: * `Pagination (Pagination)`: -`rows`は [Account](#account) オブジェクトの配列を返します。 +`rows`は [AccountWithUser](#account-with-user) オブジェクトの配列を返します。 `pagination`は [Pagination](#pagination) オブジェクトを返します。 - -## PaginatedAccountWithUsers -* `Rows (AccountWithUser[])`: + +## PaginatedAccountDetails +* `Rows (AccountDetail[])`: * `Count (int)`: * `Pagination (Pagination)`: -`rows`は [AccountWithUser](#account-with-user) オブジェクトの配列を返します。 +`rows`は [AccountDetail](#account-detail) オブジェクトの配列を返します。 `pagination`は [Pagination](#pagination) オブジェクトを返します。 @@ -2707,6 +4385,41 @@ Response.BulkTransaction response = await request.Send(client); `pagination`は [Pagination](#pagination) オブジェクトを返します。 + +## Campaign +* `Id (string)`: キャンペーンID +* `Name (string)`: キャペーン名 +* `ApplicableShops (User[])`: キャンペーン適用対象の店舗リスト +* `IsExclusive (bool)`: キャンペーンの重複を許すかどうかのフラグ +* `StartsAt (string)`: キャンペーン開始日時 +* `EndsAt (string)`: キャンペーン終了日時 +* `PointExpiresAt (string)`: キャンペーンによって付与されるポイントの失効日時 +* `PointExpiresInDays (int)`: キャンペーンによって付与されるポイントの有効期限(相対指定、単位は日) +* `Priority (int)`: キャンペーンの優先順位 +* `Description (string)`: キャンペーン説明文 +* `BearPointShop (User)`: ポイントを負担する店舗 +* `PrivateMoney (PrivateMoney)`: キャンペーンを適用するマネー +* `DestPrivateMoney (PrivateMoney)`: ポイントを付与するマネー +* `PointCalculationRule (string)`: ポイント計算ルール (banklisp表記) +* `PointCalculationRuleObject (string)`: ポイント計算ルール (JSON文字列による表記) +* `Status (string)`: キャンペーンの現在の状態 + +`applicable-shops`は [User](#user) オブジェクトの配列を返します。 + +`bear_point_shop`は [User](#user) オブジェクトを返します。 + +`dest_private_money`と`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。 + + +## PaginatedCampaigns +* `Rows (Campaign[])`: +* `Count (int)`: +* `Pagination (Pagination)`: + +`rows`は [Campaign](#campaign) オブジェクトの配列を返します。 + +`pagination`は [Pagination](#pagination) オブジェクトを返します。 + ## PrivateMoney * `Id (string)`: マネーID @@ -2721,9 +4434,29 @@ Response.BulkTransaction response = await request.Send(client); * `Type (string)`: マネー種別 (自家型=own, 第三者型=third-party) * `ExpirationType (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update) * `EnableTopupByMember (bool)`: 加盟店によるチャージが有効かどうか +* `DisplayMoneyAndPoint (string)`: `organization`は [Organization](#organization) オブジェクトを返します。 + +## Transaction +* `Id (string)`: 取引ID +* `Type (string)`: 取引種別 (チャージ=topup, 支払い=payment) +* `IsModified (bool)`: 返金された取引かどうか +* `Sender (User)`: 送金者情報 +* `SenderAccount (Account)`: 送金ウォレット情報 +* `Receiver (User)`: 受取者情報 +* `ReceiverAccount (Account)`: 受取ウォレット情報 +* `Amount (double)`: 決済総額 (マネー額 + ポイント額) +* `MoneyAmount (double)`: 決済マネー額 +* `PointAmount (double)`: 決済ポイント額 +* `DoneAt (string)`: 取引日時 +* `Description (string)`: 取引説明文 + +`receiver`と`sender`は [User](#user) オブジェクトを返します。 + +`receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。 + ## CashtrayAttempt * `Account (AccountWithUser)`: エンドユーザーのウォレット @@ -2739,10 +4472,26 @@ Response.BulkTransaction response = await request.Send(client); * `Id (string)`: ウォレットID * `Name (string)`: ウォレット名 * `IsSuspended (bool)`: ウォレットが凍結されているかどうか +* `Status (string)`: * `PrivateMoney (PrivateMoney)`: 設定マネー情報 `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。 + +## Transfer +* `Id (string)`: +* `SenderAccount (AccountWithoutPrivateMoneyDetail)`: +* `ReceiverAccount (AccountWithoutPrivateMoneyDetail)`: +* `Amount (double)`: +* `MoneyAmount (double)`: +* `PointAmount (double)`: +* `DoneAt (string)`: +* `Type (string)`: +* `Description (string)`: +* `TransactionId (string)`: + +`receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。 + ## ShopAccount * `Id (string)`: ウォレットID @@ -2769,21 +4518,6 @@ Response.BulkTransaction response = await request.Send(client); * `HasPrev (bool)`: * `HasNext (bool)`: - -## Transfer -* `Id (string)`: -* `SenderAccount (AccountWithoutPrivateMoneyDetail)`: -* `ReceiverAccount (AccountWithoutPrivateMoneyDetail)`: -* `Amount (double)`: -* `MoneyAmount (double)`: -* `PointAmount (double)`: -* `DoneAt (string)`: -* `Type (string)`: -* `Description (string)`: -* `TransactionId (string)`: - -`receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。 - ## AccountBalance * `ExpiresAt (string)`: @@ -2806,20 +4540,21 @@ Response.BulkTransaction response = await request.Send(client); * `Code (string)`: 組織コード * `Name (string)`: 組織名 - -## OrganizationSummary -* `Count (int)`: -* `MoneyAmount (double)`: -* `MoneyCount (int)`: -* `PointAmount (double)`: -* `PointCount (int)`: - ## AccountWithoutPrivateMoneyDetail * `Id (string)`: * `Name (string)`: * `IsSuspended (bool)`: +* `Status (string)`: * `PrivateMoneyId (string)`: * `User (User)`: `user`は [User](#user) オブジェクトを返します。 + + +## OrganizationSummary +* `Count (int)`: +* `MoneyAmount (double)`: +* `MoneyCount (int)`: +* `PointAmount (double)`: +* `PointCount (int)`: diff --git a/partner.yaml b/partner.yaml index d8c1e5a..f3ed7c8 100644 --- a/partner.yaml +++ b/partner.yaml @@ -36,6 +36,8 @@ tags: - name: Account - name: Private Money - name: Bulk + - name: Event + - name: Campaign components: schemas: @@ -107,6 +109,9 @@ components: is_suspended: type: boolean title: 'ウォレットが凍結されているかどうか' + status: + type: string + enum: [active, suspended, pre-closed, closed] private_money: $ref: '#/components/schemas/PrivateMoney' title: '設定マネー情報' @@ -120,13 +125,13 @@ components: type: string is_suspended: type: boolean + status: + type: string + enum: [active, suspended, pre-closed, closed] private_money: $ref: '#/components/schemas/PrivateMoney' user: $ref: '#/components/schemas/User' - external_id: - type: string - nullable: true AccountDetail: x-pokepay-schema-type: "response" properties: @@ -137,6 +142,9 @@ components: type: string is_suspended: type: boolean + status: + type: string + enum: [active, suspended, pre-closed, closed] balance: type: number format: decimal @@ -148,6 +156,12 @@ components: format: decimal private_money: $ref: '#/components/schemas/PrivateMoney' + user: + $ref: '#/components/schemas/User' + external_id: + type: string + nullable: true + maxLength: 50 ShopAccount: x-pokepay-schema-type: "response" properties: @@ -167,6 +181,9 @@ components: private_money: $ref: '#/components/schemas/PrivateMoney' title: '設定マネー情報' + AccountDeleted: + x-pokepay-schema-type: "response" + properties: {} AccountBalance: x-pokepay-schema-type: "response" properties: @@ -265,6 +282,40 @@ components: token: type: string title: チャージQRコードを解析したときに出てくるURL + CpmToken: + x-pokepay-schema-type: "response" + type: object + properties: + cpm_token: + type: string + minLength: 22 + maxLength: 22 + account: + $ref: '#/components/schemas/AccountDetail' + transaction: + $ref: '#/components/schemas/Transaction' + nullable: true + event: + $ref: '#/components/schemas/ExternalTransaction' + nullable: true + scopes: + type: array + title: 許可された取引種別 + description: エンドユーザーがCPMトークンを生成する際に指定する、CPMトークンに許可された取引の種別。 + items: + type: string + enum: [payment, topup, external-transaction] + expires_at: + type: string + format: date-time + title: CPMトークンの失効日時 + metadata: + type: string + format: json + title: エンドユーザー側メタデータ + description: |- + 取引作成時に店舗側から指定されるメタデータです。 + 全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列です。 Cashtray: x-pokepay-schema-type: "response" @@ -429,6 +480,9 @@ components: type: boolean nullable: true title: '加盟店によるチャージが有効かどうか' + display_money_and_point: + type: string + enum: [both, money-only, point-only] Organization: x-pokepay-schema-type: "response" properties: @@ -481,6 +535,51 @@ components: description: type: string title: '取引説明文' + TransactionDetail: + x-pokepay-schema-type: "response" + properties: + id: + type: string + format: uuid + title: '取引ID' + type: + type: string + title: '取引種別 (チャージ=topup, 支払い=payment)' + is_modified: + type: boolean + title: '返金された取引かどうか' + sender: + $ref: '#/components/schemas/User' + title: '送金者情報' + sender_account: + $ref: '#/components/schemas/Account' + title: '送金ウォレット情報' + receiver: + $ref: '#/components/schemas/User' + title: '受取者情報' + receiver_account: + $ref: '#/components/schemas/Account' + title: '受取ウォレット情報' + amount: + type: number + title: '決済総額 (マネー額 + ポイント額)' + money_amount: + type: number + title: '決済マネー額' + point_amount: + type: number + title: '決済ポイント額' + done_at: + type: string + format: date-time + title: '取引日時' + description: + type: string + title: '取引説明文' + transfers: + type: array + items: + $ref: '#/components/schemas/Transfer' ShopWithMetadata: x-pokepay-schema-type: "response" properties: @@ -591,7 +690,7 @@ components: format: date-time type: type: string - enum: [topup, payment, transfer, exchange] + enum: [topup, payment, transfer, exchange, cashback, expire] is_modified: type: boolean BulkTransaction: @@ -645,6 +744,9 @@ components: type: string is_suspended: type: boolean + status: + type: string + enum: [active, suspended, pre-closed, closed] private_money_id: type: string format: uuid @@ -677,12 +779,64 @@ components: format: date-time type: type: string - enum: [topup, payment, refund-topup, refund-payment, transfer, exchange-inflow, exchange-outflow, campaign-topup, refund-campaign, use-coupon, refund-coupon] + enum: [topup, payment, refund-topup, refund-payment, transfer, exchange-inflow, exchange-outflow, refund-exchange-inflow, refund-exchange-outflow, campaign-topup, refund-campaign, use-coupon, refund-coupon, cashback, expire] description: type: string transaction_id: type: string format: uuid + ExternalTransaction: + x-pokepay-schema-type: "response" + properties: + id: + type: string + format: uuid + title: ポケペイ外部取引ID + is_modified: + type: boolean + title: 返金された取引かどうか + sender: + $ref: '#/components/schemas/User' + title: 送金者情報 + sender_account: + $ref: '#/components/schemas/Account' + title: 送金ウォレット情報 + receiver: + $ref: '#/components/schemas/User' + title: 受取者情報 + receiver_account: + $ref: '#/components/schemas/Account' + title: 受取ウォレット情報 + amount: + type: number + title: 決済額 + done_at: + type: string + format: date-time + title: 取引日時 + description: + type: string + title: 取引説明文 + Product: + x-pokepay-schema-type: "response" + properties: + jan_code: + type: string + maxLength: 64 + name: + type: string + maxLength: 256 + unit_price: + type: number + minimum: 0 + price: + type: number + minimum: 0 + is_discounted: + type: boolean + other: + type: string + format: json OrganizationSummary: x-pokepay-schema-type: "response" @@ -724,6 +878,35 @@ components: minimum: 0 pagination: $ref: '#/components/schemas/Pagination' + PrivateMoneySummary: + x-pokepay-schema-type: "response" + properties: + topup_amount: + type: number + format: decimal + refunded_topup_amount: + type: number + format: decimal + payment_amount: + type: number + format: decimal + refunded_payment_amount: + type: number + format: decimal + added_point_amount: + type: number + format: decimal + refunded_added_point_amount: + type: number + format: decimal + exchange_inflow_amount: + type: number + format: decimal + exchange_outflow_amount: + type: number + format: decimal + transaction_count: + type: integer PaginatedTransaction: x-pokepay-schema-type: "response" properties: @@ -736,6 +919,33 @@ components: minimum: 0 pagination: $ref: '#/components/schemas/Pagination' + PaginatedTransactionV2: + x-pokepay-schema-type: "response" + properties: + rows: + type: array + items: + $ref: '#/components/schemas/Transaction' + per_page: + type: integer + count: + type: integer + next_page_cursor_id: + type: string + format: uuid + nullable: true + description: |- + 次ページ取得するためのID。 + + 実際にはrows末尾 + prev_page_cursor_id: + type: string + format: uuid + nullable: true + description: |- + 前ページ取得するためのID。 + + 実際にはrows先頭 PaginatedTransfers: x-pokepay-schema-type: "response" properties: @@ -772,6 +982,18 @@ components: minimum: 0 pagination: $ref: '#/components/schemas/Pagination' + PaginatedAccountDetails: + x-pokepay-schema-type: "response" + properties: + rows: + type: array + items: + $ref: '#/components/schemas/AccountDetail' + count: + type: integer + minimum: 0 + pagination: + $ref: '#/components/schemas/Pagination' PaginatedAccountBalance: x-pokepay-schema-type: "response" properties: @@ -820,7 +1042,83 @@ components: minimum: 0 pagination: $ref: '#/components/schemas/Pagination' - + Campaign: + x-pokepay-schema-type: "response" + properties: + id: + type: string + format: uuid + title: 'キャンペーンID' + name: + type: string + maxLength: 256 + title: 'キャペーン名' + applicable_shops: + type: array + title: 'キャンペーン適用対象の店舗リスト' + nullable: true + items: + $ref: '#/components/schemas/User' + is_exclusive: + type: boolean + title: 'キャンペーンの重複を許すかどうかのフラグ' + starts_at: + type: string + format: date-time + title: 'キャンペーン開始日時' + ends_at: + type: string + format: date-time + title: 'キャンペーン終了日時' + point_expires_at: + type: string + format: date-time + title: 'キャンペーンによって付与されるポイントの失効日時' + nullable: true + point_expires_in_days: + type: integer + minimum: 1 + title: 'キャンペーンによって付与されるポイントの有効期限(相対指定、単位は日)' + nullable: true + priority: + type: integer + title: 'キャンペーンの優先順位' + description: + type: string + maxLength: 200 + title: 'キャンペーン説明文' + bear_point_shop: + title: 'ポイントを負担する店舗' + $ref: '#/components/schemas/User' + private_money: + title: 'キャンペーンを適用するマネー' + $ref: '#/components/schemas/PrivateMoney' + dest_private_money: + title: 'ポイントを付与するマネー' + $ref: '#/components/schemas/PrivateMoney' + point_calculation_rule: + type: string + title: 'ポイント計算ルール (banklisp表記)' + point_calculation_rule_object: + type: string + format: json + title: 'ポイント計算ルール (JSON文字列による表記)' + status: + type: string + enum: [enabled, disabled] + title: 'キャンペーンの現在の状態' + PaginatedCampaigns: + x-pokepay-schema-type: "response" + properties: + rows: + type: array + items: + $ref: '#/components/schemas/Campaign' + count: + type: integer + minimum: 0 + pagination: + $ref: '#/components/schemas/Pagination' BadRequest: x-pokepay-schema-type: "response" oneOf: @@ -1031,39 +1329,103 @@ paths: ユーザーIDです。 指定したユーザーIDのウォレット一覧を取得します。パートナーキーと紐づく組織が発行しているマネーのウォレットのみが表示されます。 + requestBody: + required: true + content: + application/json: + schema: + properties: + page: + type: integer + minimum: 1 + title: 'ページ番号' + description: 取得したいページ番号です。デフォルト値は1です。 + per_page: + type: integer + minimum: 1 + title: '1ページ分の取引数' + description: 1ページ当たりのウォレット数です。デフォルト値は50です。 responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/PaginatedAccounts' + $ref: '#/components/schemas/PaginatedAccountDetails' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' - /accounts/{account_id}: - get: + post: tags: - - Customer - summary: 'ウォレット情報を表示する' - description: ウォレットを取得します。 - x-pokepay-operator-name: "GetAccount" + - Account + summary: 'エンドユーザーのウォレットを作成する' + x-pokepay-operator-name: "CreateUserAccount" x-pokepay-allow-server-side: true parameters: - in: path - name: account_id + name: user_id required: true schema: type: string format: uuid - title: 'ウォレットID' + title: 'ユーザーID' description: |- - ウォレットIDです。 + ユーザーIDです。 + requestBody: + required: true + content: + application/json: + schema: + required: ["private_money_id"] + properties: + private_money_id: + title: 'マネーID' + description: |- + マネーIDです。 - フィルターとして使われ、指定したウォレットIDのウォレットを取得します。 + 作成するウォレットのマネーを指定します。このパラメータは必須です。 + type: string + format: uuid + name: + title: 'ウォレット名' + type: string + maxLength: 256 + external_id: + title: '外部ID' + type: string + maxLength: 50 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetail' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /accounts/{account_id}: + get: + tags: + - Customer + summary: 'ウォレット情報を表示する' + description: ウォレットを取得します。 + x-pokepay-operator-name: "GetAccount" + x-pokepay-allow-server-side: true + parameters: + - in: path + name: account_id + required: true + schema: + type: string + format: uuid + title: 'ウォレットID' + description: |- + ウォレットIDです。 + + フィルターとして使われ、指定したウォレットIDのウォレットを取得します。 responses: '200': description: OK @@ -1106,6 +1468,15 @@ paths: type: boolean title: 'ウォレットが凍結されているかどうか' description: ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。 + status: + type: string + enum: [active, suspended, pre-closed] + title: 'ウォレット状態' + description: ウォレットの状態です。 + can_transfer_topup: + type: boolean + title: 'チャージ可能かどうか' + description: 店舗ユーザーがエンドユーザーにチャージ可能かどうかです。真にするとチャージ可能となり、偽にするとチャージ不可能となります。 responses: '200': description: OK @@ -1119,6 +1490,51 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + delete: + tags: + - Customer + summary: 'ウォレットを退会する' + description: ウォレットを退会します。一度ウォレットを退会した後は、そのウォレットを再び利用可能な状態に戻すことは出来ません。 + x-pokepay-operator-name: "DeleteAccount" + x-pokepay-allow-server-side: true + parameters: + - in: path + name: account_id + required: true + schema: + type: string + format: uuid + title: 'ウォレットID' + description: |- + ウォレットIDです。 + + 指定したウォレットIDのウォレットを退会します。 + requestBody: + required: true + content: + application/json: + schema: + properties: + cashback: + type: boolean + title: '返金有無' + description: 退会時の返金有無です。エンドユーザに返金を行う場合、真を指定して下さい。現在のマネー残高を全て現金で返金したものとして記録されます。 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDeleted' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /accounts/{account_id}/balances: get: tags: @@ -1247,6 +1663,62 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + /accounts/{account_id}/customers: + patch: + tags: + - Customer + summary: 'ウォレット情報を更新する' + description: ウォレットの状態を更新します。 + x-pokepay-operator-name: "UpdateCustomerAccount" + x-pokepay-allow-server-side: true + parameters: + - in: path + name: account_id + required: true + schema: + type: string + format: uuid + title: 'ウォレットID' + description: |- + ウォレットIDです。 + + 指定したウォレットIDのウォレットの状態を更新します。 + requestBody: + required: true + content: + application/json: + schema: + properties: + status: + type: string + enum: [active, suspended, pre-closed] + title: 'ウォレット状態' + description: ウォレットの状態です。 + account_name: + title: 'アカウント名' + type: string + maxLength: 256 + description: 変更するウォレット名です。 + external_id: + title: '外部ID' + type: string + maxLength: 50 + description: 変更する外部IDです。 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AccountWithUser' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' /accounts/customers: get: tags: @@ -1294,6 +1766,11 @@ paths: type: boolean title: 'ウォレットが凍結状態かどうかでフィルターする' description: このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。 + status: + type: string + enum: [active, suspended, pre-closed] + title: 'ウォレット状態' + description: このパラメータが指定されている場合、ウォレットの状態で結果がフィルターされます。デフォルトでは未指定です。 external_id: type: string maxLength: 50 @@ -1712,6 +2189,37 @@ paths: $ref: '#/components/schemas/Check' '400': $ref: '#/components/responses/InvalidParameters' + /cpm/{cpm_token}: + get: + tags: + - Transaction + summary: 'CPMトークンの状態取得' + description: CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。 + x-pokepay-operator-name: "GetCpmToken" + x-pokepay-allow-server-side: true + parameters: + - in: path + name: cpm_token + required: true + schema: + type: string + minLength: 22 + maxLength: 22 + title: CPMトークン + description: CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CpmToken' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '422': + $ref: '#/components/responses/UnprocessableEntity' /transactions: get: tags: @@ -1789,12 +2297,11 @@ paths: フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。 transaction_id: type: string - format: uuid title: '取引ID' description: |- 取引IDです。 - フィルターとして使われ、指定された取引のみ一覧に表示されます。 + フィルターとして使われ、指定された取引IDに部分一致(前方一致)する取引のみが一覧に表示されます。 organization_code: type: string pattern: '^[a-zA-Z0-9-]*$' @@ -1837,13 +2344,19 @@ paths: エンドユーザーから店舗への送金取引(支払い) 3. exchange-outflow -   他マネーへの流出 + 他マネーへの流出 4. exchange-inflow 他マネーからの流入 + + 5. cashback + 退会時返金取引 + + 6. expire + 退会時失効取引 items: type: string - enum: [topup, payment, exchange_outflow, exchange_inflow] + enum: [topup, payment, exchange_outflow, exchange_inflow, cashback, expire] description: type: string maxLength: 200 @@ -1911,120 +2424,299 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '422': $ref: '#/components/responses/UnprocessableEntity' - /transactions/topup: - post: + /transactions-v2: + get: tags: - Transaction - summary: 'チャージする' - description: チャージ取引を作成します。 - x-pokepay-operator-name: "CreateTopupTransaction" + summary: '取引履歴を取得する' + description: 取引一覧を返します。 + x-pokepay-operator-name: "ListTransactionsV2" x-pokepay-allow-server-side: true requestBody: required: true content: application/json: schema: - required: ["private_money_id", "shop_id", "customer_id"] + required: ["private_money_id"] properties: - shop_id: + private_money_id: type: string format: uuid - title: '店舗ID' + title: 'マネーID' description: |- - 店舗IDです。 + マネーIDです。 - 送金元の店舗を指定します。 - customer_id: + 指定したマネーでの取引が一覧に表示されます。 + organization_code: type: string - format: uuid - title: 'エンドユーザーのID' + pattern: '^[a-zA-Z0-9-]*$' + maxLength: 32 + title: '組織コード' description: |- - エンドユーザーIDです。 + 組織コードです。 - 送金先のエンドユーザーを指定します。 - private_money_id: + フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。 + example: 'pocketchange' + shop_id: type: string format: uuid - title: 'マネーID' + title: '店舗ID' description: |- - マネーIDです。 + 店舗IDです。 - マネーを指定します。 - bear_point_shop_id: + フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。 + terminal_id: type: string format: uuid - title: 'ポイント支払時の負担店舗ID' - description: |- - ポイント支払時の負担店舗IDです。 - - ポイント支払い時に実際お金を負担する店舗を指定します。 - money_amount: - type: number - minimum: 0 - title: 'マネー額' + title: '端末ID' description: |- - マネー額です。 + 端末IDです。 - 送金するマネー額を指定します。 - point_amount: - type: number - minimum: 0 - title: 'ポイント額' + フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。 + customer_id: + type: string + format: uuid + title: 'エンドユーザーID' description: |- - ポイント額です。 + エンドユーザーIDです。 - 送金するポイント額を指定します。 - point_expires_at: + フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。 + customer_name: type: string - format: date-time - title: 'ポイント有効期限' + maxLength: 256 + title: 'エンドユーザー名' description: |- - ポイントをチャージした場合の、付与されるポイントの有効期限です。 - 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + エンドユーザー名です。 + + フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。 + example: 太郎 description: type: string maxLength: 200 - title: '取引履歴に表示する説明文' + title: '取引説明文' description: |- - 取引説明文です。 + 取引を指定の取引説明文でフィルターします。 - 任意入力で、取引履歴に表示される説明文です。 - example: 初夏のチャージキャンペーン - request_id: + 取引説明文が完全一致する取引のみ抽出されます。取引説明文は最大200文字で記録されています。 + example: 店頭QRコードによる支払い + transaction_id: type: string - format: uuid - title: 'リクエストID' + title: '取引ID' description: |- - 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。 + 取引IDです。 - 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。 + フィルターとして使われ、指定された取引IDに部分一致(前方一致)する取引のみが一覧に表示されます。 + is_modified: + type: boolean + title: 'キャンセルフラグ' + description: |- + キャンセルフラグです。 - リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 - example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Transaction' - '400': - $ref: '#/components/responses/BadRequest' - '403': - $ref: '#/components/responses/Forbidden' - '422': - $ref: '#/components/responses/UnprocessableEntity' - /transactions/topup/check: - post: - tags: - - Check + これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。 + デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。 + types: + type: array + title: '取引種別 (複数指定可)、チャージ=topup、支払い=payment' + example: '["topup", "payment"]' + description: |- + 取引の種類でフィルターします。 + + 以下の種類を指定できます。 + + 1. topup + 店舗からエンドユーザーへの送金取引(チャージ) + + 2. payment + エンドユーザーから店舗への送金取引(支払い) + + 3. exchange-outflow + 他マネーへの流出 + + 4. exchange-inflow + 他マネーからの流入 + + 5. cashback + 退会時返金取引 + items: + type: string + enum: [topup, payment, exchange_outflow, exchange_inflow, cashback] + from: + type: string + format: date-time + title: '開始日時' + description: |- + 抽出期間の開始日時です。 + + フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。 + to: + type: string + format: date-time + title: '終了日時' + description: |- + 抽出期間の終了日時です。 + + フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。 + next_page_cursor_id: + type: string + format: uuid + title: '次のページへ遷移する際に起点となるtransactionのuuid' + description: |- + 次のページへ遷移する際に起点となるtransactionのuuid(前のページの末尾の要素のuuid)です。 + + prev_page_cursor_idのtransaction自体は次のページには含まれない。 + prev_page_cursor_id: + type: string + format: uuid + title: '前のページへ遷移する際に起点となるtransactionのuuid' + description: |- + 前のページへ遷移する際に起点となるtransactionのuuid(次のページの先頭の要素のuuid)です。 + + next_page_cursor_idのtransaction自体は前のページには含まれない。 + per_page: + type: integer + minimum: 1 + maximum: 1000 + title: '1ページ分の取引数' + description: |- + 1ページ分の取引数です。 + + デフォルト値は50です。 + example: 50 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTransactionV2' + '400': + $ref: '#/components/responses/InvalidParameters' + /transactions/topup: + post: + tags: + - Transaction + summary: 'チャージする' + description: チャージ取引を作成します。 + x-pokepay-operator-name: "CreateTopupTransaction" + x-pokepay-allow-server-side: true + requestBody: + required: true + content: + application/json: + schema: + required: ["private_money_id", "shop_id", "customer_id"] + properties: + shop_id: + type: string + format: uuid + title: '店舗ID' + description: |- + 店舗IDです。 + + 送金元の店舗を指定します。 + customer_id: + type: string + format: uuid + title: 'エンドユーザーのID' + description: |- + エンドユーザーIDです。 + + 送金先のエンドユーザーを指定します。 + private_money_id: + type: string + format: uuid + title: 'マネーID' + description: |- + マネーIDです。 + + マネーを指定します。 + bear_point_shop_id: + type: string + format: uuid + title: 'ポイント支払時の負担店舗ID' + description: |- + ポイント支払時の負担店舗IDです。 + + ポイント支払い時に実際お金を負担する店舗を指定します。 + money_amount: + type: integer + minimum: 0 + title: 'マネー額' + description: |- + マネー額です。 + + 送金するマネー額を指定します。 + デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。 + point_amount: + type: integer + minimum: 0 + title: 'ポイント額' + description: |- + ポイント額です。 + + 送金するポイント額を指定します。 + デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。 + point_expires_at: + type: string + format: date-time + title: 'ポイント有効期限' + description: |- + ポイントをチャージした場合の、付与されるポイントの有効期限です。 + 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + description: + type: string + maxLength: 200 + title: '取引履歴に表示する説明文' + description: |- + 取引説明文です。 + + 任意入力で、取引履歴に表示される説明文です。 + example: 初夏のチャージキャンペーン + metadata: + type: string + format: json + title: '取引メタデータ' + description: |- + 取引作成時に指定されるメタデータです。 + + 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + example: |- + {"key":"value"} + request_id: + type: string + format: uuid + title: 'リクエストID' + description: |- + 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。 + + 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。 + + リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 + example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionDetail' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /transactions/topup/check: + post: + tags: + - Check summary: 'チャージQRコードを読み取ることでチャージする' description: | 通常チャージQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。 @@ -2061,7 +2753,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' '400': $ref: '#/components/responses/BadRequest' '403': @@ -2112,7 +2804,7 @@ paths: マネーを指定します。 amount: - type: number + type: integer minimum: 0 title: '支払い額' description: |- @@ -2128,6 +2820,180 @@ paths: 任意入力で、取引履歴に表示される説明文です。 example: たい焼き(小倉) + metadata: + type: string + format: json + title: '取引メタデータ' + description: |- + 取引作成時に指定されるメタデータです。 + + 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + example: |- + {"key":"value"} + products: + type: array + items: + type: object + properties: + jan_code: + type: string + maxLength: 64 + name: + type: string + maxLength: 256 + unit_price: + type: number + minimum: 0 + price: + type: number + minimum: 0 + is_discounted: + type: boolean + other: + type: string + format: json + example: |- + {"jan_code":"abc", + "name":"name1", + "unit_price":100, + "price": 100, + "is_discounted": false, + "other":"{}"} + title: '商品情報データ' + description: |- + 一つの取引に含まれる商品情報データです。 + 以下の内容からなるJSONオブジェクトの配列で指定します。 + + - `jan_code`: JANコード。64字以下の文字列 + - `name`: 商品名。256字以下の文字列 + - `unit_price`: 商品単価。0以上の数値 + - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値 + - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean + - `other`: その他商品に関する情報。JSONオブジェクトで指定します。 + request_id: + type: string + format: uuid + title: 'リクエストID' + description: |- + 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。 + + 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。 + + リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 + example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionDetail' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /transactions/cpm: + post: + tags: + - Transaction + summary: 'CPMトークンによる取引作成' + description: | + CPMトークンにより取引を作成します。 + CPMトークンに設定されたスコープの取引を作ることができます。 + x-pokepay-operator-name: "CreateCpmTransaction" + x-pokepay-allow-server-side: true + requestBody: + required: true + content: + application/json: + schema: + required: ["cpm_token", "shop_id", "amount"] + properties: + cpm_token: + type: string + minLength: 22 + maxLength: 22 + title: 'CPMトークン' + description: |- + エンドユーザーによって作られ、アプリなどに表示され、店舗に対して提示される22桁の文字列です。 + + エンドユーザーによって許可された取引のスコープを持っています。 + shop_id: + type: string + format: uuid + title: '店舗ID' + description: |- + 店舗IDです。 + + 支払いやチャージを行う店舗を指定します。 + amount: + type: number + title: '取引金額' + description: |- + 取引金額を指定します。 + + 正の値を与えるとチャージになり、負の値を与えると支払いとなります。 + description: + type: string + maxLength: 200 + title: '取引説明文' + description: |- + 取引説明文です。 + + エンドユーザーアプリの取引履歴などに表示されます。 + example: たい焼き(小倉) + metadata: + type: string + format: json + title: '店舗側メタデータ' + description: |- + 取引作成時に店舗側から指定されるメタデータです。 + + 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + example: |- + {"key":"value"} + products: + type: array + items: + type: object + properties: + jan_code: + type: string + maxLength: 64 + name: + type: string + maxLength: 256 + unit_price: + type: number + minimum: 0 + price: + type: number + minimum: 0 + is_discounted: + type: boolean + other: + type: string + format: json + example: |- + {"jan_code":"abc", + "name":"name1", + "unit_price":100, + "price": 100, + "is_discounted": false, + "other":"{}"} + title: 商品情報データ + description: |- + 一つの取引に含まれる商品情報データです。 + 以下の内容からなるJSONオブジェクトの配列で指定します。 + + - `jan_code`: JANコード。64字以下の文字列 + - `name`: 商品名。256字以下の文字列 + - `unit_price`: 商品単価。0以上の数値 + - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値 + - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean + - `other`: その他商品に関する情報。JSONオブジェクトで指定します。 request_id: type: string format: uuid @@ -2145,7 +3011,64 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' + examples: + example-1: + value: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + type: string + is_modified: true + sender: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + name: string + is_merchant: true + sender_account: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + name: string + is_suspended: true + private_money: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + name: string + unit: string + is_exclusive: true + description: string + oneline_message: string + organization: + code: string + name: string + max_balance: 0 + transfer_limit: 0 + type: own + expiration_type: static + enable_topup_by_member: true + receiver: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + name: string + is_merchant: true + receiver_account: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + name: string + is_suspended: true + private_money: + id: 497f6eca-6276-4993-bfeb-53cbbbba6f08 + name: string + unit: string + is_exclusive: true + description: string + oneline_message: string + organization: + code: string + name: string + max_balance: 0 + transfer_limit: 0 + type: own + expiration_type: static + enable_topup_by_member: true + amount: 0 + money_amount: 0 + point_amount: 0 + done_at: '2019-08-24T14:15:22Z' + description: string '400': $ref: '#/components/responses/BadRequest' '403': @@ -2201,6 +3124,16 @@ paths: マネー額です。 送金するマネー額を指定します。 + metadata: + type: string + format: json + title: '取引メタデータ' + description: |- + 取引作成時に指定されるメタデータです。 + + 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。 + example: |- + {"key":"value"} description: type: string maxLength: 200 @@ -2227,7 +3160,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' '400': $ref: '#/components/responses/BadRequest' '403': @@ -2278,7 +3211,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' '400': $ref: '#/components/responses/BadRequest' '422': @@ -2382,7 +3315,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' '400': $ref: '#/components/responses/InvalidParameters' '403': @@ -2393,8 +3326,16 @@ paths: post: tags: - Transaction - summary: '返金する' - x-pokepay-operator-name: "RefundTransaction" + summary: '取引をキャンセルする' + description: |- + 取引IDを指定して取引をキャンセルします。 + + 発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。 + キャンセル対象の取引に付随するポイント還元キャンペーンやクーポン適用も取り消されます。 + + チャージ取引のキャンセル時に返金すべき残高が足りないときは `account_balance_not_enough (422)` エラーが返ります。 + 取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。 + x-pokepay-operator-name: RefundTransaction x-pokepay-allow-server-side: true parameters: - in: path @@ -2421,15 +3362,194 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Transaction' + $ref: '#/components/schemas/TransactionDetail' '403': $ref: '#/components/responses/Forbidden' '422': $ref: '#/components/responses/UnprocessableEntity' - /transfers: - get: + /external-transactions: + post: tags: - - Transaction + - Event + summary: 'ポケペイ外部取引を作成する' + description: | + ポケペイ外部取引を作成します。 + + ポケペイ外の現金決済やクレジットカード決済に対してポケペイのポイントを付けたいというときに使用します。 + x-pokepay-operator-name: "CreateExternalTransaction" + x-pokepay-allow-server-side: true + requestBody: + required: true + content: + application/json: + schema: + required: + - private_money_id + - shop_id + - customer_id + - amount + properties: + shop_id: + type: string + format: uuid + title: 店舗ID + description: |- + 店舗IDです。 + + ポケペイ外部取引が行なう店舗を指定します。 + customer_id: + type: string + format: uuid + title: エンドユーザーID + description: |- + エンドユーザーIDです。 + + エンドユーザーを指定します。 + private_money_id: + type: string + format: uuid + title: マネーID + description: |- + マネーIDです。 + + マネーを指定します。 + amount: + type: integer + minimum: 0 + title: 取引額 + description: |- + 取引金額です。 + description: + type: string + maxLength: 200 + title: 取引説明文 + description: |- + 取引説明文です。 + + 任意入力で、取引履歴に表示される説明文です。 + example: たい焼き(小倉) + metadata: + type: string + format: json + title: ポケペイ外部取引メタデータ + description: |- + ポケペイ外部取引作成時に指定され、取引と紐付けられるメタデータです。 + + 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSONで指定します。 + example: |- + {"key":"value"} + products: + type: array + items: + type: object + properties: + jan_code: + type: string + maxLength: 64 + name: + type: string + maxLength: 256 + unit_price: + type: number + minimum: 0 + price: + type: number + minimum: 0 + is_discounted: + type: boolean + other: + type: string + format: json + example: |- + {"jan_code":"abc", + "name":"name1", + "unit_price":100, + "price": 100, + "is_discounted": false, + "other":"{}"} + title: '商品情報データ' + description: |- + 一つの取引に含まれる商品情報データです。 + 以下の内容からなるJSONオブジェクトの配列で指定します。 + + - `jan_code`: JANコード。64字以下の文字列 + - `name`: 商品名。256字以下の文字列 + - `unit_price`: 商品単価。0以上の数値 + - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値 + - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean + - `other`: その他商品に関する情報。JSONオブジェクトで指定します。 + request_id: + type: string + format: uuid + title: リクエストID + description: |- + 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。 + + 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。 + + リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。 + example: 9dbfd997-b948-40d3-a3bf-6bc1a01368d2 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTransaction' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /external-transactions/{event_id}/refund: + post: + tags: + - Event + summary: 'ポケペイ外部取引をキャンセルする' + description: |- + 取引IDを指定して取引をキャンセルします。 + + 発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。 + キャンセル対象のポケペイ外部取引に付随するポイント還元キャンペーンも取り消されます。 + + 取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。 + x-pokepay-operator-name: RefundExternalTransaction + x-pokepay-allow-server-side: true + parameters: + - in: path + name: event_id + required: true + schema: + type: string + format: uuid + title: '取引ID' + requestBody: + required: true + content: + application/json: + schema: + properties: + description: + type: string + maxLength: 200 + title: '取引履歴に表示する返金事由' + example: '返品対応のため' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTransaction' + '403': + $ref: '#/components/responses/Forbidden' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /transfers: + get: + tags: + - Transaction x-pokepay-operator-name: "ListTransfers" x-pokepay-allow-server-side: true requestBody: @@ -2474,7 +3594,7 @@ paths: type: array items: type: string - enum: [topup, payment, transfer, exchange] + enum: [topup, payment, transfer, exchange, cashback, expire] transfer_types: type: array description: |- @@ -2496,9 +3616,15 @@ paths: 5. coupon クーポンによる値引き処理、またはそのキャンセル取引 + + 6. cashback + 退会時の返金取引 + + 7. expire + 退会時失効取引 items: type: string - enum: [topup, payment, exchange, transfer, coupon, campaign] + enum: [topup, payment, exchange, transfer, coupon, campaign, cashback, expire] description: type: string maxLength: 200 @@ -2535,7 +3661,7 @@ paths: type: string maxLength: 32 title: '新規組織コード' - example: ox_supermarket + example: ox-supermarket name: type: string maxLength: 256 @@ -2565,7 +3691,7 @@ paths: type: string pattern: '^$|^[0-9]{4}$' title: '銀行金融機関コード' - example: 99X + example: '1234' bank_branch_name: type: string maxLength: 64 @@ -2575,7 +3701,7 @@ paths: type: string pattern: '^(|[0-9]{3})$' title: '銀行支店コード' - example: 99X + example: '123' bank_account_type: type: string enum: [saving, current, other] @@ -2585,7 +3711,7 @@ paths: maxLength: 7 pattern: '[0-9]{0,7}' title: '銀行口座番号' - example: 9999999 + example: '1234567' bank_account_holder_name: # TODO: flico type: string @@ -3099,6 +4225,50 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + /private-moneys/{private_money_id}/summary: + get: + tags: + - Private Money + summary: 取引サマリを取得する + x-pokepay-operator-name: "GetPrivateMoneySummary" + x-pokepay-allow-server-side: true + requestBody: + required: true + content: + application/json: + schema: + properties: + from: + type: string + format: date-time + title: '開始日時' + to: + type: string + format: date-time + title: '終了日時' + parameters: + - in: path + name: private_money_id + required: true + schema: + type: string + format: uuid + title: マネーID + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PrivateMoneySummary' + '400': + $ref: '#/components/responses/InvalidParameters' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' /customers/transactions: get: tags: @@ -3139,7 +4309,8 @@ paths: フィルターとして使われ、指定された受取ユーザーでの取引のみ一覧に表示されます。 type: type: string - title: '取引種別、チャージ=topup、支払い=payment、個人間送金=transfer' + enum: [topup, payment, exchange, transfer, cashback, expire] + title: '取引種別' description: |- 取引の種類でフィルターします。 @@ -3153,6 +4324,10 @@ paths: 他マネーへの流出(outflow)/他マネーからの流入(inflow) 4. transfer 個人間送金 + 5. cashback + ウォレット退会時返金 + 6. expire + ウォレット退会時失効 is_modified: type: boolean title: 'キャンセル済みかどうか' @@ -3481,3 +4656,1081 @@ paths: $ref: '#/components/responses/NotFound' '422': $ref: '#/components/responses/UnprocessableEntity' + /campaigns: + post: + tags: + - Campaign + summary: 'ポイント付与キャンペーンを作る' + description: | + ポイント付与キャンペーンを作成します。 + x-pokepay-operator-name: "CreateCampaign" + x-pokepay-allow-server-side: true + requestBody: + required: true + content: + application/json: + schema: + required: ["name", "private_money_id", "starts_at", "ends_at","priority", "event"] + properties: + name: + title: 'キャンペーン名' + type: string + maxLength: 256 + description: |- + キャンペーン名です(必須項目)。 + + ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。 + private_money_id: + type: string + format: uuid + title: 'マネーID' + description: |- + キャンペーン対象のマネーのIDです(必須項目)。 + starts_at: + type: string + format: date-time + title: 'キャンペーン開始日時' + description: |- + キャンペーン開始日時です(必須項目)。 + キャンペーン期間中のみポイントが付与されます。 + 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + ends_at: + type: string + format: date-time + title: 'キャンペーン終了日時' + description: |- + キャンペーン終了日時です(必須項目)。 + キャンペーン期間中のみポイントが付与されます。 + 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + priority: + type: integer + title: 'キャンペーンの適用優先度' + description: |- + キャンペーンの適用優先度です。 + + 優先度が大きいものから順に適用判定されていきます。 + キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。 + event: + type: string + enum: [topup, payment, external-transaction] + title: 'イベント種別' + description: |- + キャンペーンのトリガーとなるイベントの種類を指定します(必須項目)。 + + 以下のいずれかを指定できます。 + + 1. topup + 店舗からエンドユーザーへの送金取引(チャージ) + 2. payment + エンドユーザーから店舗への送金取引(支払い) + 3. external-transaction + ポケペイ外の取引(現金決済など) + bear_point_shop_id: + type: string + format: uuid + title: 'ポイント負担先店舗ID' + description: |- + ポイントを負担する店舗のIDです。デフォルトではマネー発行体の本店が設定されます。 + ポイント負担先店舗は後から更新することはできません。 + description: + type: string + maxLength: 200 + title: 'キャンペーンの説明文' + description: |- + キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。 + status: + type: string + enum: [enabled, disabled] + title: 'キャンペーン作成時の状態' + description: |- + キャンペーン作成時の状態を指定します。デフォルトではenabledです。 + + 以下のいずれかを指定できます。 + + 1. enabled + 有効 + 2. disabled + 無効 + point_expires_at: + type: string + format: date-time + title: 'ポイント有効期限(絶対日時指定)' + description: |- + キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。 + 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + point_expires_in_days: + type: integer + minimum: 1 + title: 'ポイント有効期限(相対日数指定)' + description: |- + キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。 + 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + is_exclusive: + type: boolean + title: 'キャンペーンの重複設定' + description: |- + キャンペーンの重ね掛けを行うかどうかのフラグです。 + + これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。 + falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。 + subject: + type: string + enum: [money, all] + title: 'ポイント付与の対象金額の種別' + description: |- + ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。 + eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。 + + 以下のいずれかを指定できます。 + + 1. money + moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします + + 2. all + all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む) + 注意: event を topup にしたときはポイントの付与に対しても適用されます + amount_based_point_rules: + type: array + items: + type: object + properties: + point_amount: + type: number + format: decimal + minimum: 0 + title: '付与ポイント量' + description: |- + キャンペーンにより付与するポイント量。(必須項目) + + point_amount_unitにより指定される単位が絶対額のときは小数点以下が切り捨てられ整数として扱われます。 + パーセント指定の時は小数を許容し、割合計算後に小数点以下が切り捨てられます。 + いずれの場合も実際に付与されるポイントは整数のみです。 + point_amount_unit: + type: string + enum: [percent, absolute] + title: '付与ポイント量の単位' + description: |- + キャンペーンにより付与するポイント量の単位を指定します。(必須項目) + + 以下のいずれかを指定できます。 + + 1. percent + 付与するポイント量が元取引の取引額に応じて割合で変化するときに指定します。 + + 2. absolute + 付与するポイント量が元取引の取引額に依存しない絶対額であるときに指定します。 + subject_more_than: + type: integer + minimum: 0 + title: '対象金額の下限値 (x <)' + description: |- + 対象金額の下限値 (x <) を指定します (ただし、指定された金額は含まない)。 + subject_more_than_or_equal といずれかのみ指定できます。 + subject_more_than_or_equal: + type: integer + minimum: 0 + title: '対象金額の下限値 (x <=)' + description: |- + 対象金額の下限値 (x <=) を指定します。 + subject_more_than といずれかのみ指定できます。 + subject_less_than: + type: integer + minimum: 0 + title: '対象金額の上限値 (< x)' + description: |- + 対象金額の上限値 (< x) を指定します (ただし、指定された金額は含まない)。 + subject_less_than_or_equal といずれかのみ指定できます。 + subject_less_than_or_equal: + type: integer + minimum: 0 + title: '対象金額の上限値 (<= x)' + description: |- + 対象金額の上限値 (<= x) を指定します。 + subject_less_than といずれかのみ指定できます。 + example: |- + { + "point_amount": 5, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 1000, + "subject_less_than": 5000 + } + + title: '取引金額ベースのポイント付与ルール' + description: |- + 金額をベースとしてポイント付与を行うルールを指定します。 + amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 + 各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。 + + 例: + ```javascript + [ + // 1000円以上、5000円未満の決済には 5% + { + "point_amount": 5, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 1000, + "subject_less_than": 5000 + }, + // 5000円以上の決済には 10% + { + "point_amount": 10, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 5000 + }, + ] + ``` + + product_based_point_rules: + type: array + items: + type: object + properties: + point_amount: + type: number + format: decimal + minimum: 0 + title: '付与ポイント量' + description: |- + キャンペーンにより付与するポイント量。単位は point_amount_unit で指定します。(必須項目) + + point_amount_unitにより指定される単位が絶対額のときは小数点以下が切り捨てられ整数として扱われます。 + パーセント指定の時は小数を許容し、割合計算後に小数点以下が切り捨てられます。 + いずれの場合も実際に付与されるポイントは整数のみです。 + point_amount_unit: + type: string + enum: [percent, absolute] + title: '付与ポイント量の単位' + description: |- + キャンペーンにより付与するポイント量の単位を指定します。(必須項目) + + 以下のいずれかを指定できます。 + + 1. percent + 付与するポイント量が元取引の取引額に応じて割合で変化するときに指定します。 + + 2. absolute + 付与するポイント量が元取引の取引額に依存しない絶対額であるときに指定します。 + product_code: + type: string + maxLength: 64 + title: '対象の製品コード' + description: |- + 対象の製品コード (JANコードやISBNコードなど) を指定します。(必須項目) + + SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (例: 978-% でISBNコード) + items: + type: string + required_count: + type: integer + minimum: 1 + title: '必要購入個数' + description: |- + キャンペーン適用のための対象商品の必要購入個数を指定します (例:商品Aを2個以上購入するとn%ポイント)。 + デフォルト値は1です。 + is_multiply_by_count: + type: boolean + title: '複数個購入したときにポイント付与額に個数を掛けるかどうか' + description: |- + キャンペーン対象の商品を複数個購入したときに、個数に応じてポイント付与額を増やすかどうかのフラグです。 + デフォルト値は false です。 + starts_at: + type: string + format: date-time + title: '商品個別のキャンペーン開始日時' + description: |- + このルールを適用する開始日時を指定します。 + デフォルトではキャンペーン全体の開始日時が指定されます。 + 商品個別にキャンペーン期間指定をする場合は、キャンペーン全体の期間指定の範囲内に入っている必要があります。 + ends_at: + type: string + format: date-time + title: '商品個別のキャンペーン終了日時' + description: |- + このルールを適用する終了日時を指定します。 + デフォルトではキャンペーン全体の終了日時が指定されます。 + 商品個別にキャンペーン期間指定をする場合は、キャンペーン全体の期間指定の範囲内に入っている必要があります。 + example: |- + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + "is_multiply_by_count": true, + "required_count": 2 + } + + title: '商品情報ベースのポイント付与ルール' + description: |- + 商品情報をベースとしてポイント付与を行うルールを指定します。 + ルールは商品ごとに設定可能で、ルールの配列として指定します。 + amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 + event が payment か external-transaction の時のみ有効です。 + 各ルールの順序は問わず、適用可能なものは全て適用されます。 + 一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。 + + 例: + ```javascript + [ + // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + }, + // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + "is_multiply_by_count": true, + }, + // 対象商品を2つ以上購入したら500ポイント付与(固定額付与) + { + "point_amount": 500, + "point_amount_unit": "absolute", + "product_code": "4912345678904", + "required_count": 2 + }, + // 書籍は10%ポイント付与 + // ※ISBNの形式はレジがポケペイに送信する形式に準じます + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-%", + }, + // 一部の出版社の書籍は10%ポイント付与 + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-4-01-%", // 旺文社 + } + ] + ``` + + applicable_days_of_week: + type: array + items: + type: integer + minimun: 0 + maximum: 6 + title: 'キャンペーンを適用する曜日 (複数指定)' + describe: |- + キャンペーンを適用する曜日を指定します (複数指定)。 + 曜日は整数で表します。月曜を 0 とし、日曜を 6 とします。 + 指定しなかった場合は全日を対象にします (曜日による適用条件なし) + applicable_time_ranges: + type: array + items: + type: object + properties: + from: + type: string + description: |- + 時間帯の開始時刻 (HH:mmの形式) + to: + type: string + description: |- + 時間帯の終了時刻 (HH:mmの形式) + example: |- + { + "from": "12:00", + "to": "23:59" + } + + title: 'キャンペーンを適用する時間帯 (複数指定)' + describe: |- + キャンペーンを適用する時間帯を指定します (複数指定可)。 + 時間帯はfromとtoからなるオブジェクトで指定します。 + fromとtoは両方必要です。 + applicable_shop_ids: + type: array + items: + type: string + format: uuid + title: 'キャンペーン適用対象となる店舗IDのリスト' + describe: |- + キャンペーンを適用する店舗IDを指定します (複数指定)。 + 指定しなかった場合は全店舗が対象になります。 + minimum_number_for_combination_purchase: + type: integer + minimum: 1 + title: '複数種類の商品を同時購入するときの商品種別数の下限' + description: |- + 複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。デフォルトでは未指定で、指定する場合は1以上の整数を指定します。 + + このパラメータを指定するときは product_based_point_rules で商品毎のルールが指定されている必要があります。 + 例えば、A商品とB商品とC商品のうち、キャンペーンの発火のために2商品以上が同時購入される必要があるときは 2 を指定します。 + + 例1: 商品A, Bが同時購入されたときに固定ポイント額(200ポイント)付与 + ```javascript + { + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード" + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード" + } + ] + } + ``` + + 例2: 商品A, Bが3個ずつ以上同時購入されたときに固定ポイント額(200ポイント)付与 + ```javascript + { + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード", + "required_count": 3 + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード", + "required_count": 3 + } + ] + } + ``` + + 例2: 商品A, B, Cのうち2商品以上が同時購入されたときに総額の10%ポイントが付与 + ```javascript + { + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Aの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Bの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Cの商品コード", + "is_multiply_by_count": true, + } + ] + } + ``` + dest_private_money_id: + type: string + format: uuid + title: 'ポイント付与先となるマネーID' + description: |- + キャンペーンを駆動するイベントのマネーとは「別のマネー」に対してポイントを付けたいときに、そのマネーIDを指定します。 + + ポイント付与先のマネーはキャンペーンを駆動するイベントのマネーと同一発行体が発行しているものに限ります。その他のマネーIDが指定された場合は private_money_not_found (422) が返ります。 + エンドユーザー、店舗、ポイント負担先店舗はポイント付与先マネーのウォレットを持っている必要があります。持っていない場合はポイントは付きません。 + 元のイベントのマネーと異なる複数のマネーに対して同時にポイントを付与することはできません。重複可能に設定されている複数のキャンペーンで別々のポイント付与先マネーを指定した場合は最も優先度の高いものが処理され、残りは無視されます。 + キャンペーンのポイント付与先マネーは後から更新することはできません。 + デフォルトではポイント付与先はキャンペーンを駆動するイベントのマネー(private_money_idで指定したマネー)になります。 + + 別マネーに対するポイント付与は別のtransactionとなります。 RefundTransaction で元のイベントをキャンセルしたときはポイント付与のtransactionもキャンセルされ、逆にポイント付与のtransactionをキャンセルしたときは連動して元のイベントがキャンセルされます。 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Campaign' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '422': + $ref: '#/components/responses/UnprocessableEntity' + get: + tags: + - Campaign + summary: 'キャンペーン一覧を取得する' + description: |- + マネーIDを指定してキャンペーンを取得します。 + 発行体の組織マネージャ権限で、自組織が発行するマネーのキャンペーンについてのみ閲覧可能です。 + 閲覧権限がない場合は unpermitted_admin_user エラー(422)が返ります。 + x-pokepay-operator-name: "ListCampaigns" + x-pokepay-allow-server-side: true + requestBody: + required: true + content: + application/json: + schema: + required: ["private_money_id"] + properties: + private_money_id: + type: string + format: uuid + title: 'マネーID' + description: |- + マネーIDです。 + + フィルターとして使われ、指定したマネーでのキャンペーンのみ一覧に表示されます。 + is_ongoing: + type: boolean + title: '現在適用可能なキャンペーンかどうか' + description: |- + 有効化されており、現在キャンペーン期間内にあるキャンペーンをフィルターするために使われます。 + 真であれば適用可能なもののみを抽出し、偽であれば適用不可なもののみを抽出します。 + デフォルトでは未指定(フィルターなし)です。 + page: + type: integer + minimum: 1 + title: 'ページ番号' + description: 取得したいページ番号です。 + example: 1 + per_page: + type: integer + minimum: 1 + title: '1ページ分の取得数' + description: 1ページ分の取得数です。デフォルトでは 20 になっています。 + example: 50 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCampaigns' + '400': + $ref: '#/components/responses/InvalidParameters' + '422': + $ref: '#/components/responses/UnprocessableEntity' + /campaigns/{campaign_id}: + get: + tags: + - Campaign + summary: 'キャンペーンを取得する' + description: |- + IDを指定してキャンペーンを取得します。 + 発行体の組織マネージャ権限で、自組織が発行するマネーのキャンペーンについてのみ閲覧可能です。 + 閲覧権限がない場合は unpermitted_admin_user エラー(422)が返ります。 + x-pokepay-operator-name: "GetCampaign" + x-pokepay-allow-server-side: true + parameters: + - in: path + name: campaign_id + required: true + schema: + type: string + format: uuid + title: 'キャンペーンID' + description: |- + キャンペーンIDです。 + + 指定したIDのキャンペーンを取得します。存在しないIDを指定した場合は404エラー(NotFound)が返ります。 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Campaign' + '400': + $ref: '#/components/responses/InvalidParameters' + '422': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + patch: + tags: + - Campaign + summary: 'ポイント付与キャンペーンを更新する' + description: | + ポイント付与キャンペーンを更新します。 + x-pokepay-operator-name: "UpdateCampaign" + x-pokepay-allow-server-side: true + parameters: + - in: path + name: campaign_id + required: true + schema: + type: string + format: uuid + title: 'キャンペーンID' + description: |- + キャンペーンIDです。 + + 指定したIDのキャンペーンを更新します。存在しないIDを指定した場合は404エラー(NotFound)が返ります。 + requestBody: + required: true + content: + application/json: + schema: + properties: + name: + title: 'キャンペーン名' + type: string + maxLength: 256 + description: |- + キャンペーン名です。 + + ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。 + starts_at: + type: string + format: date-time + title: 'キャンペーン開始日時' + description: |- + キャンペーン開始日時です。 + キャンペーン期間中のみポイントが付与されます。 + 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + ends_at: + type: string + format: date-time + title: 'キャンペーン終了日時' + description: |- + キャンペーン終了日時です。 + キャンペーン期間中のみポイントが付与されます。 + 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。 + priority: + type: integer + title: 'キャンペーンの適用優先度' + description: |- + キャンペーンの適用優先度です。 + + 優先度が大きいものから順に適用判定されていきます。 + キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。 + event: + type: string + enum: [topup, payment, external-transaction] + title: 'イベント種別' + description: |- + キャンペーンのトリガーとなるイベントの種類を指定します。 + + 以下のいずれかを指定できます。 + + 1. topup + 店舗からエンドユーザーへの送金取引(チャージ) + 2. payment + エンドユーザーから店舗への送金取引(支払い) + 3. external-transaction + ポケペイ外の取引(現金決済など) + description: + type: string + maxLength: 200 + title: 'キャンペーンの説明文' + description: |- + キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。 + status: + type: string + enum: [enabled, disabled] + title: 'キャンペーン作成時の状態' + description: |- + キャンペーン作成時の状態を指定します。デフォルトではenabledです。 + + 以下のいずれかを指定できます。 + + 1. enabled + 有効 + 2. disabled + 無効 + point_expires_at: + type: string + format: date-time + nullable: true + title: 'ポイント有効期限(絶対日時指定)' + description: |- + キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。 + 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + point_expires_in_days: + type: integer + minimum: 1 + nullable: true + title: 'ポイント有効期限(相対日数指定)' + description: |- + キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。 + 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。 + is_exclusive: + type: boolean + title: 'キャンペーンの重複設定' + description: |- + キャンペーンの重ね掛けを行うかどうかのフラグです。 + + これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。 + falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。 + subject: + type: string + enum: [money, all] + title: 'ポイント付与の対象金額の種別' + description: |- + ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。 + eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。 + + 以下のいずれかを指定できます。 + + 1. money + moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします + + 2. all + all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む) + 注意: event を topup にしたときはポイントの付与に対しても適用されます + amount_based_point_rules: + type: array + items: + type: object + properties: + point_amount: + type: number + format: decimal + minimum: 0 + title: '付与ポイント量' + description: |- + キャンペーンにより付与するポイント量。(必須項目) + + point_amount_unitにより指定される単位が絶対額のときは小数点以下が切り捨てられ整数として扱われます。 + パーセント指定の時は小数を許容し、割合計算後に小数点以下が切り捨てられます。 + いずれの場合も実際に付与されるポイントは整数のみです。 + point_amount_unit: + type: string + enum: [percent, absolute] + title: '付与ポイント量の単位' + description: |- + キャンペーンにより付与するポイント量の単位を指定します。(必須項目) + + 以下のいずれかを指定できます。 + + 1. percent + 付与するポイント量が元取引の取引額に応じて割合で変化するときに指定します。 + + 2. absolute + 付与するポイント量が元取引の取引額に依存しない絶対額であるときに指定します。 + subject_more_than: + type: integer + minimum: 0 + title: '対象金額の下限値 (x <)' + description: |- + 対象金額の下限値 (x <) を指定します (ただし、指定された金額は含まない)。 + subject_more_than_or_equal といずれかのみ指定できます。 + subject_more_than_or_equal: + type: integer + minimum: 0 + title: '対象金額の下限値 (x <=)' + description: |- + 対象金額の下限値 (x <=) を指定します。 + subject_more_than といずれかのみ指定できます。 + subject_less_than: + type: integer + minimum: 0 + title: '対象金額の上限値 (< x)' + description: |- + 対象金額の上限値 (< x) を指定します (ただし、指定された金額は含まない)。 + subject_less_than_or_equal といずれかのみ指定できます。 + subject_less_than_or_equal: + type: integer + minimum: 0 + title: '対象金額の上限値 (<= x)' + description: |- + 対象金額の上限値 (<= x) を指定します。 + subject_less_than といずれかのみ指定できます。 + example: |- + { + "point_amount": 5, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 1000, + "subject_less_than": 5000 + } + + title: '取引金額ベースのポイント付与ルール' + nullable: true + description: |- + 金額をベースとしてポイント付与を行うルールを指定します。 + amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 + 各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。 + + 例: + ```javascript + [ + // 1000円以上、5000円未満の決済には 5% + { + "point_amount": 5, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 1000, + "subject_less_than": 5000 + }, + // 5000円以上の決済には 10% + { + "point_amount": 10, + "point_amount_unit": "percent", + "subject_more_than_or_equal": 5000 + }, + ] + ``` + + product_based_point_rules: + type: array + items: + type: object + properties: + point_amount: + type: number + format: decimal + minimum: 0 + title: '付与ポイント量' + description: |- + キャンペーンにより付与するポイント量。単位は point_amount_unit で指定します。(必須項目) + + point_amount_unitにより指定される単位が絶対額のときは小数点以下が切り捨てられ整数として扱われます。 + パーセント指定の時は小数を許容し、割合計算後に小数点以下が切り捨てられます。 + いずれの場合も実際に付与されるポイントは整数のみです。 + point_amount_unit: + type: string + enum: [percent, absolute] + title: '付与ポイント量の単位' + description: |- + キャンペーンにより付与するポイント量の単位を指定します。(必須項目) + + 以下のいずれかを指定できます。 + + 1. percent + 付与するポイント量が元取引の取引額に応じて割合で変化するときに指定します。 + + 2. absolute + 付与するポイント量が元取引の取引額に依存しない絶対額であるときに指定します。 + product_code: + type: string + maxLength: 64 + title: '対象の製品コード' + description: |- + 対象の製品コード (JANコードやISBNコードなど) を指定します。(必須項目) + + SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (例: 978-% でISBNコード) + items: + type: string + required_count: + type: integer + minimum: 1 + title: '必要購入個数' + description: |- + キャンペーン適用のための対象商品の必要購入個数を指定します (例:商品Aを2個以上購入するとn%ポイント)。 + デフォルト値は1です。 + is_multiply_by_count: + type: boolean + title: '複数個購入したときにポイント付与額に個数を掛けるかどうか' + description: |- + キャンペーン対象の商品を複数個購入したときに、個数に応じてポイント付与額を増やすかどうかのフラグです。 + デフォルト値は false です。 + starts_at: + type: string + format: date-time + title: '商品個別のキャンペーン開始日時' + description: |- + このルールを適用する開始日時を指定します。 + デフォルトではキャンペーン全体の開始日時が指定されます。 + 商品個別にキャンペーン期間指定をする場合は、キャンペーン全体の期間指定の範囲内に入っている必要があります。 + ends_at: + type: string + format: date-time + title: '商品個別のキャンペーン終了日時' + description: |- + このルールを適用する終了日時を指定します。 + デフォルトではキャンペーン全体の終了日時が指定されます。 + 商品個別にキャンペーン期間指定をする場合は、キャンペーン全体の期間指定の範囲内に入っている必要があります。 + example: |- + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + "is_multiply_by_count": true, + "required_count": 2 + } + + title: '商品情報ベースのポイント付与ルール' + nullable: true + description: |- + 商品情報をベースとしてポイント付与を行うルールを指定します。 + ルールは商品ごとに設定可能で、ルールの配列として指定します。 + amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。 + event が payment か external-transaction の時のみ有効です。 + 各ルールの順序は問わず、適用可能なものは全て適用されます。 + 一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。 + + 例: + ```javascript + [ + // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + }, + // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。 + { + "point_amount": 5, + "point_amount_unit": "percent", + "product_code": "4912345678904", + "is_multiply_by_count": true, + }, + // 対象商品を2つ以上購入したら500ポイント付与(固定額付与) + { + "point_amount": 500, + "point_amount_unit": absolute", + "product_code": "4912345678904", + "required_count": 2 + }, + // 書籍は10%ポイント付与 + // ※ISBNの形式はレジがポケペイに送信する形式に準じます + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-%", + }, + // 一部の出版社の書籍は10%ポイント付与 + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "978-4-01-%", // 旺文社 + } + ] + ``` + + applicable_days_of_week: + type: array + items: + type: integer + minimun: 0 + maximum: 6 + nullable: true + title: 'キャンペーンを適用する曜日 (複数指定)' + describe: |- + キャンペーンを適用する曜日を指定します (複数指定)。 + 曜日は整数で表します。月曜を 0 とし、日曜を 6 とします。 + 指定しなかった場合は全日を対象にします (曜日による適用条件なし) + applicable_time_ranges: + type: array + items: + type: object + properties: + from: + type: string + description: |- + 時間帯の開始時刻 (HH:mmの形式) + to: + type: string + description: |- + 時間帯の終了時刻 (HH:mmの形式) + example: |- + { + "from": "12:00", + "to": "23:59" + } + + nullable: true + title: 'キャンペーンを適用する時間帯 (複数指定)' + describe: |- + キャンペーンを適用する時間帯を指定します (複数指定可)。 + 時間帯はfromとtoからなるオブジェクトで指定します。 + fromとtoは両方必要です。 + applicable_shop_ids: + type: array + items: + type: string + format: uuid + nullable: true + title: 'キャンペーン適用対象となる店舗IDのリスト' + describe: |- + キャンペーンを適用する店舗IDを指定します (複数指定)。 + 指定しなかった場合は全店舗が対象になります。 + minimum_number_for_combination_purchase: + type: integer + minimum: 1 + nullable: true + title: '複数種類の商品を同時購入するときの商品種別数の下限' + description: |- + 複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。 + + このパラメータを指定するときは product_based_point_rules で商品毎のルールが指定されている必要があります。 + 例えば、A商品とB商品とC商品のうち、キャンペーンの発火のために2商品以上が同時購入される必要があるときは 2 を指定します。 + + 例1: 商品A, Bが同時購入されたときに固定ポイント額(200ポイント)付与 + ```javascript + { + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード" + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード" + } + ] + } + ``` + + 例2: 商品A, Bが3個ずつ以上同時購入されたときに固定ポイント額(200ポイント)付与 + ```javascript + { + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Aの商品コード", + "required_count": 3 + }, + { + "point_amount": 100, + "point_amount_unit": "absolute", + "product_code": "商品Bの商品コード", + "required_count": 3 + } + ] + } + ``` + + 例2: 商品A, B, Cのうち2商品以上が同時購入されたときに総額の10%ポイントが付与 + ```javascript + { + minimum_number_for_combination_purchase: 2, + product_based_point_rules: [ + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Aの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Bの商品コード", + "is_multiply_by_count": true, + }, + { + "point_amount": 10, + "point_amount_unit": "percent", + "product_code": "商品Cの商品コード", + "is_multiply_by_count": true, + } + ] + } + ``` + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Campaign' + '400': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' diff --git a/src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# b/src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# new file mode 100644 index 0000000..8bcf7d2 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# @@ -0,0 +1,146 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestCreatePaymentTransaction + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task CreatePaymentTransaction0() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ); + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreatePaymentTransaction1() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ) { + RequestId = "caaed78e-be70-4d36-ac89-c0a64bc1ca0a", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreatePaymentTransaction2() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ) { + Products = new object[]{ + new Dictionary(){ + {"jan_code","abc"}, + {"name","name1"}, + {"unit_price",100}, + {"price",100}, + {"is_discounted",false}, + {"other","{}"} + }, + }, + new Dictionary(){ + {"jan_code","abc"}, + {"name","name1"}, + {"unit_price",100}, + {"price",100}, + {"is_discounted",false}, + {"other","{}"} + } + }, + RequestId = "375e0e3f-d49f-4d1b-8364-25e1c287d7f7", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreatePaymentTransaction3() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ) { + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "edfecf7c-6781-488d-8d75-c0e2f323c41d", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreatePaymentTransaction4() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ) { + Description = "jQ03lDRu1dHypEu4pqRk9KXy", + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "eecf1f7e-aaf7-4b0b-b89a-cd669deb41c1", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestBulkCreateTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestBulkCreateTransaction.cs index fa154f8..3890a5d 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestBulkCreateTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestBulkCreateTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,9 +25,9 @@ public async Task BulkCreateTransaction0() { try { Request.BulkCreateTransaction request = new Request.BulkCreateTransaction( - "gtc1eHQx", - "a3", - "8fcy9G2ru7CIugZBUKc64A8KJDFHDE0sPhVL" + "TN1", + "ktFjJy7", + "P4SbKkoz4u4vqNtkYjPXUyJ1V0r5CHRNT2ec" ); Response.BulkTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -41,11 +42,11 @@ public async Task BulkCreateTransaction1() { try { Request.BulkCreateTransaction request = new Request.BulkCreateTransaction( - "gtc1eHQx", - "a3", - "8fcy9G2ru7CIugZBUKc64A8KJDFHDE0sPhVL" + "TN1", + "ktFjJy7", + "P4SbKkoz4u4vqNtkYjPXUyJ1V0r5CHRNT2ec" ) { - Description = "mxr0FU3DnW6KqsDEeelMkJvsg1mQveiZolVhKjCQVZwzstz19XaUt7HUg2vBtQ3icUlEOMImvGy37aG3VpRl", + Description = "Ldc33OSn94wpSCBGnb27KI1Ko9Ro9P2UOPHKcZd7kJ0a09BOfpTrIxahzBDxgf0eAPjokEVHRFLghiMn2sJjV2bGnLruRc9c27Gpu7i", }; Response.BulkTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCancelCashtray.cs b/src/PokepayPartnerCsharpSdk.Test/TestCancelCashtray.cs index 60906e1..cdf00d6 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCancelCashtray.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCancelCashtray.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task CancelCashtray0() { try { Request.CancelCashtray request = new Request.CancelCashtray( - "9cf07c12-3205-408c-873e-fed1154bba7e" + "6b1bf8c8-a061-49c0-a5ca-53c7e7365805" ); Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateBill.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateBill.cs index 250c67d..d76498c 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateBill.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateBill.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,8 +25,8 @@ public async Task CreateBill0() { try { Request.CreateBill request = new Request.CreateBill( - "10b38e5a-a0a2-4643-b978-0431d3fe12c5", - "6be77097-48f0-43b4-96fd-0f6bfa0ed65f" + "99dcacd9-5096-4d5d-a76d-7d532be62f04", + "86feaa53-d0d7-461e-aee4-902ed59606a4" ); Response.Bill response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -40,10 +41,10 @@ public async Task CreateBill1() { try { Request.CreateBill request = new Request.CreateBill( - "10b38e5a-a0a2-4643-b978-0431d3fe12c5", - "6be77097-48f0-43b4-96fd-0f6bfa0ed65f" + "99dcacd9-5096-4d5d-a76d-7d532be62f04", + "86feaa53-d0d7-461e-aee4-902ed59606a4" ) { - Description = "AmGgvgI7Yg", + Description = "nFdHza9f0TF30iljDxgSpyfoekUtYXnQ6dyRqDXbojqilSXXfgL13rI", }; Response.Bill response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -58,11 +59,11 @@ public async Task CreateBill2() { try { Request.CreateBill request = new Request.CreateBill( - "10b38e5a-a0a2-4643-b978-0431d3fe12c5", - "6be77097-48f0-43b4-96fd-0f6bfa0ed65f" + "99dcacd9-5096-4d5d-a76d-7d532be62f04", + "86feaa53-d0d7-461e-aee4-902ed59606a4" ) { - Amount = 7044.0, - Description = "C9RfQiSpTWZrd0hVSBtTuiSKN3fmfJoVUvvyWz4acD4YN5", + Amount = 1850.0, + Description = "1kMYSkzLYWcqyBEPqq6jXo", }; Response.Bill response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateCampaign.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateCampaign.cs new file mode 100644 index 0000000..c9cb4c2 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateCampaign.cs @@ -0,0 +1,443 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestCreateCampaign + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task CreateCampaign0() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ); + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign1() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + DestPrivateMoneyId = "0f518127-01d2-45f9-be0a-b4bb1ba833af", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign2() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + MinimumNumberForCombinationPurchase = 7472, + DestPrivateMoneyId = "274e8422-ee20-4471-ac15-fbec8a743ad7", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign3() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + ApplicableShopIds = new string[]{"15cafefc-e9f9-46bc-a685-02c33b3f8a9b", "e8215f1d-664e-4056-a57a-b521fbdf2ed4", "8dc559c4-09c4-48a8-8ac3-5dd5e6105ace", "d5c68923-4689-458e-960f-1327d8b0015e", "d9c4c614-4ca9-4930-9b3a-7a0b32a8d00b", "ea73e1b0-ff46-4717-95b2-fa7b51c45b0b", "a6194ad6-6c88-42de-91af-03e811b842fd"}, + MinimumNumberForCombinationPurchase = 7081, + DestPrivateMoneyId = "ee5834ee-7929-4e10-9890-c95e409e9333", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign4() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"2cf489ed-ef9b-45af-8f83-ce9ad0b4bcc0"}, + MinimumNumberForCombinationPurchase = 5700, + DestPrivateMoneyId = "a68f30d3-46cd-4ec4-bcfa-29baa739e82c", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign5() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + ApplicableDaysOfWeek = new int[]{5, 4, 3, 4, 3}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"860f63fe-30c8-469b-8249-41d50aa83bc2", "cedde10e-62a1-4479-b9df-a394c3aa9930", "e50a20de-8b7e-4c9e-896c-0e0ea833c6e2", "6c9ad8e6-c216-4783-b8a1-ac42b76fd9fe", "703d06a2-9325-48f9-a525-4889a459c72c", "068db7a5-c49f-4a79-8cfe-c35ee947f585", "3fb10f27-3280-4edd-a74a-c66ce37087ec", "653ee761-80f4-4df9-93aa-09b0ab2cae65", "9e4c8bf8-8a6f-45bb-965a-5a775ab33a3d", "6781fcff-0f3c-446e-9dd8-e332d516f594"}, + MinimumNumberForCombinationPurchase = 9038, + DestPrivateMoneyId = "0e9999ad-a81b-467d-aa4a-4d56cb7d336b", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign6() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{6, 5, 2, 2}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{}, + MinimumNumberForCombinationPurchase = 6213, + DestPrivateMoneyId = "3375b838-1f4e-4d73-ace9-c0b09a66570c", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign7() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{2, 3, 1, 2}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"726260c8-b049-4e69-8deb-f0f5cab9738b", "5bf55ff7-5acc-425f-9e51-e5961ca7e626", "527703c1-f383-48e9-8bfb-98a8f0bf5b7f", "186c481f-9a11-4f0b-a73d-8630c3fc44be", "6d20739a-9359-4abe-af72-40c4835792c8"}, + MinimumNumberForCombinationPurchase = 9232, + DestPrivateMoneyId = "d38c401e-5b9c-4593-a0ab-654c478c7e01", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign8() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{}, + ApplicableDaysOfWeek = new int[]{3, 1, 1, 4, 0, 2}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{}, + MinimumNumberForCombinationPurchase = 3975, + DestPrivateMoneyId = "2f8df75f-bfab-4dbc-8e3b-901f7f3bb710", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign9() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + IsExclusive = false, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{1, 4, 2}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"14a888b3-7aa8-473c-a71f-cf1692658030", "c15343ee-82cb-4db7-83f4-22e2788832b3", "8d95431c-8362-4f01-b448-191d7ed17d16", "938ee356-c10f-48c7-81e0-944afc49e54a"}, + MinimumNumberForCombinationPurchase = 6630, + DestPrivateMoneyId = "87cd0e16-3b0e-4a6a-a599-9b514c94be62", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign10() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + PointExpiresInDays = 657, + IsExclusive = false, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{6, 1, 2, 2, 2, 1, 6}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"a053fe03-e795-4430-9a71-75cc5ec3b745", "f7401a77-a719-4f78-9a77-03abd4a26a9c", "25a5262f-1d2d-4d6a-b81a-cf01123aed95", "5e985e55-6f34-4941-a834-4f4bee553bbc", "e7374ada-7fc2-4d7b-a17f-12a07823ba51"}, + MinimumNumberForCombinationPurchase = 1032, + DestPrivateMoneyId = "27b30364-d676-42f5-91e2-2835f1887fe0", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign11() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + PointExpiresAt = "2022-09-13T07:14:33.000000+09:00", + PointExpiresInDays = 4502, + IsExclusive = false, + Subject = "all", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{1, 6, 4, 4, 3, 6, 4, 4, 1, 6}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"e91438f4-fe3e-496c-a800-f38e81c66abb", "693419f4-da26-40c1-9558-49718c9ddedc", "7780f166-680a-4636-96f5-dc10074d6b93", "f1e6518f-5b65-4672-9874-24bcface8d9a", "c35a5506-e60e-4ced-ac0e-bb56e9516070", "8e47ae13-851d-4b1c-bd33-3f695aad6ad0"}, + MinimumNumberForCombinationPurchase = 920, + DestPrivateMoneyId = "44ef85f1-b6af-44d2-a8e2-c38f83941603", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign12() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + Status = "disabled", + PointExpiresAt = "2025-06-01T15:08:23.000000+09:00", + PointExpiresInDays = 1733, + IsExclusive = true, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{0, 5, 6, 4}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"3f647cb8-b57e-4649-8015-d6fbcef3a06b", "b83f65e0-f207-4768-b4d4-c9e6c4de3c15", "b233a161-671b-4551-97cc-340f75ef989f"}, + MinimumNumberForCombinationPurchase = 8671, + DestPrivateMoneyId = "6259b271-db3b-4505-963c-fee8f70db1a1", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign13() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + Description = "FbA6TsT4rGSzhCtzrrQIFeK35Z3EF7SWnLL5qkYPGTd8wILW6Ubji6nDVo6kwtt0eE996vZBp0zzwPN5DIhcy9tg03Xeu", + Status = "enabled", + PointExpiresAt = "2020-03-09T08:10:07.000000+09:00", + PointExpiresInDays = 6614, + IsExclusive = true, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{3, 3, 2}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"88bec65e-920f-4b88-a9e6-d8596416fbca", "9d2677ad-e260-4e16-b8ed-e6e141b54ccf", "d81ac31f-c699-42b8-b4bd-9d57a0f6b903", "9b030e23-0012-4497-9d4b-a82045aa9416", "61e0d203-2ce9-4827-a5f1-1b06fc773d70", "fbd664fa-873f-47f9-a0c6-9efb2db88577", "26e110e3-037e-48b0-9b3b-9b16b210b24f", "c2b1d8fc-4406-4fb5-b191-d85dcaef2044", "5f6bac48-fa96-4f07-b60c-21e369c2353c"}, + MinimumNumberForCombinationPurchase = 1602, + DestPrivateMoneyId = "d12f3564-27f9-4b93-bf56-ee5a298b9285", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCampaign14() + { + try { + Request.CreateCampaign request = new Request.CreateCampaign( + "BHpzVqBZqNRFUo9BhqQxq9FR8VF2gH7EAnlFEgMmyi8jmBN0T80aLvrKoRyTXgPVT4Az", + "e60cfb65-025c-41ef-9a45-3e1759e3633b", + "2018-11-30T11:04:25.000000+09:00", + "2017-09-30T18:52:58.000000+09:00", + 3829, + "payment" + ) { + BearPointShopId = "319c9b3d-e86e-43bb-9a34-0c6f7828e8b5", + Description = "A5DSTN7FZ8Y8t8MIK7GdyM50XmxAy3ATlXa99m3Ela8zcR94JgHtiXrfi45gdORj3Jla3Pfb8OgNhhqnfBQjVsClPPd45bUBovESo5O7DwwlNZPFf6xG0YeVkLQLhc7hbuv3B8S8pH3eqOx8cOR3TFR9a8hMUMtt7RdIKeKSciqwdkkgvqZQpE", + Status = "disabled", + PointExpiresAt = "2024-07-17T09:36:41.000000+09:00", + PointExpiresInDays = 8193, + IsExclusive = true, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{6, 0, 2, 0, 4, 2, 1, 5, 1, 2}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"c47a2e37-b8fb-43d9-98ed-64d44e50f08e", "1e61cf10-4974-4c0f-8908-1d0d41fb6bca", "df564315-6ad9-486a-b073-06be67a354b5", "3fb0d66e-6ab0-453b-ac46-42010e357aea", "14a0e187-16ac-4e9e-a327-726df3ed4e19", "5e2678dd-061c-4810-9487-2dc625174ff6", "40df89de-54cf-40b6-9090-85df72e2403e", "ec1c997f-f002-455a-aaad-ae3e7a84d056", "16f68e58-fe38-4a99-9c37-7ed00138e015"}, + MinimumNumberForCombinationPurchase = 1101, + DestPrivateMoneyId = "8bc265fa-4252-4429-8032-3ab9914691ef", + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateCashtray.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateCashtray.cs index 729b188..10704b9 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateCashtray.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateCashtray.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,9 +25,9 @@ public async Task CreateCashtray0() { try { Request.CreateCashtray request = new Request.CreateCashtray( - "dfc5a242-9910-4e02-8acf-8107b715e8eb", - "852fd018-fd23-481b-9cc4-a333ad15e046", - 8463.0 + "7b2ba0a6-dee3-4169-bd25-5afb57c27b40", + "dc3626b6-77fc-47c4-b069-b447dbd7c6e4", + 7392.0 ); Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -41,11 +42,11 @@ public async Task CreateCashtray1() { try { Request.CreateCashtray request = new Request.CreateCashtray( - "dfc5a242-9910-4e02-8acf-8107b715e8eb", - "852fd018-fd23-481b-9cc4-a333ad15e046", - 8463.0 + "7b2ba0a6-dee3-4169-bd25-5afb57c27b40", + "dc3626b6-77fc-47c4-b069-b447dbd7c6e4", + 7392.0 ) { - ExpiresIn = 1911, + ExpiresIn = 7826, }; Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -60,12 +61,12 @@ public async Task CreateCashtray2() { try { Request.CreateCashtray request = new Request.CreateCashtray( - "dfc5a242-9910-4e02-8acf-8107b715e8eb", - "852fd018-fd23-481b-9cc4-a333ad15e046", - 8463.0 + "7b2ba0a6-dee3-4169-bd25-5afb57c27b40", + "dc3626b6-77fc-47c4-b069-b447dbd7c6e4", + 7392.0 ) { - Description = "naI0WeOGlWmmegc1KGhe3TxnuKac7CS1DK4Gnrr3oBLGMXHrz9mqfRhRmUp8pN9pjtBKEK15Dd3XxCT0Zmu6u7tOxquneNatGolCf6SjeF7SeZXyMS6WkNJ2", - ExpiresIn = 2760, + Description = "dOVzLT6tirwJLurByrAGwszVwlQAuTXTWtKg2YB5YxVquVYsbDyysRisRQ9ectqoj4yKOsEPCrpQPvSjUDltH57ysDpO4lTbJ9dqwKn5NSHIJ7mbc5qbOnYCYxA4AjI47p6qtIsaCpt80GzH1FRWe6", + ExpiresIn = 6500, }; Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateCheck.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateCheck.cs index aa3fc9b..b98a421 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateCheck.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateCheck.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,9 +25,9 @@ public async Task CreateCheck0() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 5442.0, + MoneyAmount = 6406.0, }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -41,10 +42,10 @@ public async Task CreateCheck1() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 4924.0, - Description = "BCDG7j4DoWkpZIbqBi9TROGFtlR9rLj2Y1ER9gKdUSrcKHlFd3Ur1MCMIUROIYftW7QMsIbzCAj1GsSvfXjxUW5PMdDuBsMe04PTf8v", + MoneyAmount = 7560.0, + Description = "6TYPgxIzfeirgwWnuJKugM3OQh2JHBnxbiEM0oFGnnvKX9mW4mLe", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -59,11 +60,11 @@ public async Task CreateCheck2() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 7165.0, - IsOnetime = false, - Description = "QwwHu7ykbtkzGPhzROeLpMaUZfjz7mGpF3omDB92rueqlmfnAfu7erS3gFr3FTdQ8rwckpkfwdxwxZ95sfTG55oAI4V", + MoneyAmount = 8205.0, + IsOnetime = true, + Description = "HweV", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -78,12 +79,12 @@ public async Task CreateCheck3() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 9795.0, - UsageLimit = 6471, + MoneyAmount = 2950.0, + UsageLimit = 4601, IsOnetime = false, - Description = "4sTwcYeFwcP7ZmLygXYRtjxN2aIco6xNkWo0aYr1y1KHCmQGL0IM3EaCDd87kJG01a7GOWj7LV4v5yotPxhlRj2vkjikjfOo5Zy9zD8cfycxdjXF6cmwiKvevzAx7rHin0MHYFpvhqZUg2yG4", + Description = "DqMFurm2HyY5rxBRsFTyEvnewbYd4rNZJsCq7m7arw2NKYH12xHXaAOFqIwxrvxkxwVYBDQiRCyVTR3czNdwQ9LziqjK5MdQ1lZMyARXVB9A32ESqVUKE1GN9JqLEvyRdA5j20ws4Z1pnjZ8xWKeN3WKGyHXCKD", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -98,13 +99,13 @@ public async Task CreateCheck4() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 6414.0, - ExpiresAt = "2019-05-03T14:12:01.000000+09:00", - UsageLimit = 7164, - IsOnetime = true, - Description = "L4evFZLjpsodOQD43fZ5T5bk20dIuBp2e25agSXyEGickpeze", + MoneyAmount = 9233.0, + ExpiresAt = "2024-08-13T01:01:15.000000+09:00", + UsageLimit = 8368, + IsOnetime = false, + Description = "9olxtCG8sS34enFyHhIbteE1tQOMttUhD0OiwEvovxL7L6kZ3KaNub1zwaCdHgj8ik3dmsSURUNaSg6OcHEmOeQFO3Ox8qDzS", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -119,14 +120,14 @@ public async Task CreateCheck5() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 4023.0, - PointExpiresAt = "2018-03-11T02:38:10.000000+09:00", - ExpiresAt = "2022-07-08T12:11:45.000000+09:00", - UsageLimit = 872, - IsOnetime = false, - Description = "ltNB5ed", + MoneyAmount = 721.0, + PointExpiresAt = "2023-06-18T12:50:23.000000+09:00", + ExpiresAt = "2022-06-13T19:26:25.000000+09:00", + UsageLimit = 7698, + IsOnetime = true, + Description = "NC6SfrLsEgbwDrafzykU4qQWw", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -141,15 +142,15 @@ public async Task CreateCheck6() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 1652.0, - PointExpiresInDays = 5298, - PointExpiresAt = "2020-07-06T08:37:37.000000+09:00", - ExpiresAt = "2024-02-16T01:46:48.000000+09:00", - UsageLimit = 3355, + MoneyAmount = 7086.0, + PointExpiresInDays = 9379, + PointExpiresAt = "2018-12-03T12:37:48.000000+09:00", + ExpiresAt = "2024-08-24T00:57:08.000000+09:00", + UsageLimit = 1768, IsOnetime = true, - Description = "n6abEccTMUOFUG9Fme9wlEEj2gZC8ckmFOzWRdKb11QTIHM0x5oJQ4O2Nwel4rHJTDGFvqXggC9Tcy7ogKmUw0VnsFyzfyt6Bg95FB1a7IFTBkW9tPubyeqITUoc54HWI6lY", + Description = "7JkqQ2DDr8e6Qf8fK7SBxethCuCr4dBSWzD3agMTAvZtCmtviHLHOBHoLHZ5Hyso5u9Osjia9h3ovwp1QqOYhJfTJv94bnDyHKg7jf7TRBDusrb62imeaN035TYhQYVT6897JBIT98Ea3vOiHnJbC3RzxMsG", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -164,16 +165,16 @@ public async Task CreateCheck7() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 8215.0, - BearPointAccount = "526fadb3-fa90-457f-8e5c-0678195e33c1", - PointExpiresInDays = 5555, - PointExpiresAt = "2018-09-23T16:27:36.000000+09:00", - ExpiresAt = "2018-03-05T11:35:21.000000+09:00", - UsageLimit = 1183, - IsOnetime = false, - Description = "6LVyn2dOGJj5BoyL1MgjctfisLuYo4aorOwFrhmbs26EDkzDLnAr7NHvMDZLOk3Kn6N9IKA2DQ0UDl0RkGXqQRpkGArTGUPugetKJLdESdgB4DMlPh", + MoneyAmount = 5780.0, + BearPointAccount = "c1af4784-46d4-4052-9fd1-04a3fa8985d6", + PointExpiresInDays = 6945, + PointExpiresAt = "2023-07-25T12:28:26.000000+09:00", + ExpiresAt = "2016-06-03T17:04:55.000000+09:00", + UsageLimit = 7755, + IsOnetime = true, + Description = "fr7wcTIqfZGa8VmM7LxaafZsEiZ4h1kUtLESZUqCMHUv6WI9WlLqAjFFVtovIA3w7if4YoZJ6xmZ8N4p4uCNZaugRp11iMcrfILoN8ZP7287JaoYb8spv1FcaYx8c7c37K2BoQEomxqdvzxKVxdoit0nsRd", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -188,10 +189,10 @@ public async Task CreateCheck8() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 4341.0, - PointAmount = 8453.0, + MoneyAmount = 7999.0, + PointAmount = 6753.0, }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -206,11 +207,11 @@ public async Task CreateCheck9() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 1819.0, - PointAmount = 12.0, - Description = "gx6J23S5a4KJH2dJnXOeAy8xYgmSSWd6nFdHza9f0TF30iljDxgSpyfoekUtYXnQ6dyRqDXbojqilSXXfgL13rI1kMYSkzLYWcqyBEPqq6jXoMPoI5dYhtAEAC8MN1MIRbysguh0xXqdkQK8VGfHRzulBqoPAVuBC2EUluqb81O3ZagKE8LcCa8bz2nHShe5Eo", + MoneyAmount = 8837.0, + PointAmount = 7734.0, + Description = "9IRy95uKnYj6aDVb3qDkr4z", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -225,12 +226,12 @@ public async Task CreateCheck10() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 342.0, - PointAmount = 5638.0, + MoneyAmount = 2007.0, + PointAmount = 5825.0, IsOnetime = false, - Description = "dmx1iMacSt3whWHQ5cbR62EyfrAyRxoXmZ8au8D4esSHy55WYfHfvN0QEBe9OUmuQoNyAxdhT65YfaNVM2xjqlPxxy8RqwFWTQ1hvVt9bN2zIxNZx4eE9mHPjq6XCvYjxbcuNA5AOQHru6gAX", + Description = "7t4NS9wkdOXwioDpfXuzoNbRpuKefj9znX2XonFzQcO5QEOmdgUm73I2kFchNQksZB6ByT3lVRQ7O823WFeXCsADfveWv5SetJLuZcB6tdcwibyPvTHbjOWbqqVGNOP2f7Fmc6XSXXM3Y5XPxnjFhfkfYgvABxRhj", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -245,13 +246,13 @@ public async Task CreateCheck11() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 4463.0, - PointAmount = 8092.0, - UsageLimit = 7440, + MoneyAmount = 9899.0, + PointAmount = 9349.0, + UsageLimit = 8408, IsOnetime = false, - Description = "UpOUbFxl1xg8SX1voG8Gydqo4fQ7D47J36mgyKf2pLnur36TYPgxI", + Description = "6F6onhtgkbe1I3fnSrAjiMpnuQgQNZWqLAFAWqZBqyjs43AAjNChMERBnJER6lOBQBwAgsTow2Z3Uka1wds9TY9Bp5VDJiBPB1XeTNJcIKtWyeNc1zzlxW2hgOK8NI225RAsUHuuLFS", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -266,14 +267,14 @@ public async Task CreateCheck12() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 5024.0, - PointAmount = 7269.0, - ExpiresAt = "2016-07-06T05:37:37.000000+09:00", - UsageLimit = 3031, + MoneyAmount = 9908.0, + PointAmount = 8704.0, + ExpiresAt = "2019-04-26T10:28:52.000000+09:00", + UsageLimit = 8888, IsOnetime = true, - Description = "JKugM3OQh2JHBnxbiEM0oFGnnvKX9mW4mLerHweV6yDqMFurm2HyY5rxBRsFTyEvnewbYd4rNZJsCq7m7arw2NKYH12xHXaAOFqIwxrvxkxwVYBDQiRCyV", + Description = "hKD", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -288,15 +289,15 @@ public async Task CreateCheck13() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 1083.0, - PointAmount = 7854.0, - PointExpiresAt = "2022-11-09T12:14:18.000000+09:00", - ExpiresAt = "2016-07-31T12:05:06.000000+09:00", - UsageLimit = 7214, - IsOnetime = false, - Description = "czNdwQ9LziqjK5MdQ1lZMyA", + MoneyAmount = 2375.0, + PointAmount = 1634.0, + PointExpiresAt = "2019-01-28T23:19:44.000000+09:00", + ExpiresAt = "2017-04-01T10:05:47.000000+09:00", + UsageLimit = 8306, + IsOnetime = true, + Description = "6zxkmTZedVWeLbSdWlORFkWxf1fgII7vrhxHZrOEIH6HNdDlfIrfFFwUdXhpSi4j72IcAxs47XeIzYlwiQaQGyn4Age91Y1cWNDBnv9RrzZK5kL8kuH9QZjAoA9Wjz3xWF4fJVtnG3Avmta", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -311,16 +312,16 @@ public async Task CreateCheck14() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 1234.0, - PointAmount = 8064.0, - PointExpiresInDays = 6979, - PointExpiresAt = "2024-08-10T09:35:05.000000+09:00", - ExpiresAt = "2018-04-18T08:05:42.000000+09:00", - UsageLimit = 5344, + MoneyAmount = 59.0, + PointAmount = 6448.0, + PointExpiresInDays = 3901, + PointExpiresAt = "2019-05-31T03:19:07.000000+09:00", + ExpiresAt = "2023-03-07T18:36:03.000000+09:00", + UsageLimit = 3273, IsOnetime = true, - Description = "SqVUKE1GN9JqLEvyRdA5j20ws4Z1pnjZ8xWKeN3WKGyHXCKDfS0S9olxtCG8sS34enFyHh", + Description = "gud6F1UgGMHbk2IRflsvwuZxk0nQmXMvg0Fc", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -335,17 +336,17 @@ public async Task CreateCheck15() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - MoneyAmount = 4553.0, - PointAmount = 5773.0, - BearPointAccount = "aa1efee2-12fb-4a74-a545-2a0562a1f98f", - PointExpiresInDays = 5520, - PointExpiresAt = "2018-06-14T19:13:27.000000+09:00", - ExpiresAt = "2018-12-04T15:17:40.000000+09:00", - UsageLimit = 8710, - IsOnetime = true, - Description = "OMttUhD0OiwEvovxL7L6kZ3KaNub1zwaCdHgj8ik3dmsSURUNaSg6OcHEmOeQFO3Ox8qDzSQ0YVNC6SfrLsEgbwDrafzykU4qQWwEl9RBh7JkqQ2DDr8e6Qf8fK7SBxethCuCr4dBSWzD3agMTAvZtCmtviHLHOBHoLHZ5Hyso5u9Osjia9h3ovwp1QqOYh", + MoneyAmount = 5589.0, + PointAmount = 4338.0, + BearPointAccount = "a334af1a-2e28-4ac2-9f0d-d5c86ad58a8e", + PointExpiresInDays = 1744, + PointExpiresAt = "2024-08-25T06:38:19.000000+09:00", + ExpiresAt = "2023-11-25T04:31:05.000000+09:00", + UsageLimit = 9411, + IsOnetime = false, + Description = "s46hfsRF0YKxTClCMK7WZ9OzNLNkjfoAuPSksHUuefNAm0yTlB8Y7jnhE6v0ICVfZpB32LWZFMYYNQ77hNnDgeQkP6BrHNLW2TjgwJkClYsxYjLV6mNckmXWb6cDTOBEvT1fZYocBrtgwRLixenA1GWqf2JPqamqpbbuSj1PURjYRasH9AR", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -360,9 +361,9 @@ public async Task CreateCheck16() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 3558.0, + PointAmount = 653.0, }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -377,10 +378,10 @@ public async Task CreateCheck17() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 7124.0, - Description = "v94bnDyHKg7jf7TRBDusrb62imeaN035TYhQYVT6897JBIT98Ea3vOiHnJbC3RzxMsGYTRQVbbD", + PointAmount = 5893.0, + Description = "ntTDK9f1O2csoG3F55uy56fVMl4ovKtbbNMLWzz4xf72tklHyikvXSu1xVqKMzKtPMLBX6YLvmDqPAbWtHJHRtQBqCHsxk71k", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -395,11 +396,11 @@ public async Task CreateCheck18() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 7755.0, + PointAmount = 9193.0, IsOnetime = true, - Description = "fr7wcTIqfZGa8VmM7LxaafZsEiZ4h1kUtLESZUqCMHUv6WI9WlLqAjFFVtovIA3w7if4YoZJ6xmZ8N4p4uCNZaugRp11iMcrfILoN8ZP7287JaoYb8spv1FcaYx8c7c37K2BoQEomxqdvzxKVxdoit0nsRd", + Description = "HcZ37iojnk7j2j33qMA4N2evwLBNS7QyCEhtgNDuAnxydB9u3o7ZMeTosoRh4S0mExQI1uCwHXvSS9xqXNJM", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -414,12 +415,12 @@ public async Task CreateCheck19() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 7999.0, - UsageLimit = 6753, + PointAmount = 6236.0, + UsageLimit = 1020, IsOnetime = false, - Description = "T9IRy95uKnYj6aDVb3qDkr4zFWttvA7t4NS9wkdOXwioDpfXuzoNbRp", + Description = "qv2rRxx8SeYgA5RTAZIE0d3whSKLF4xWXCgQOdSsQVPrApoltrzZbMjGbqCaDUv1CsWTy6z2FdXbfXavW2HwaVVWGcOvRgfjTir1eeHpnGAvFN5uVHKI7mM3plgJR5fwzKIFQcpGZZVlRU03Fa2F6", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -434,13 +435,13 @@ public async Task CreateCheck20() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 9565.0, - ExpiresAt = "2017-02-13T22:49:55.000000+09:00", - UsageLimit = 4769, + PointAmount = 6692.0, + ExpiresAt = "2024-02-12T12:16:30.000000+09:00", + UsageLimit = 7484, IsOnetime = false, - Description = "j9znX2XonFzQcO5QEOmdgUm73I2kFchNQksZB6ByT3lVRQ7O823WFeXCsADfveWv5SetJLuZcB6tdcwibyPvTHbjOWbqqVGNOP2f7Fm", + Description = "pGrOCijX4VQZjHwhb9lV9sTjbq8Wo22UU1er3T1gBtfr20CiDsCwyLdW5AzEeQbE5VhNxjrtNh84WLuHKWoYQpDLtJyiWbDVy6Ss7attO0KDvZ2PuoFKU33PYYZTEIyRndmm72c2", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -455,14 +456,14 @@ public async Task CreateCheck21() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 7691.0, - PointExpiresAt = "2016-03-06T09:52:08.000000+09:00", - ExpiresAt = "2021-09-17T16:54:03.000000+09:00", - UsageLimit = 1206, + PointAmount = 9270.0, + PointExpiresAt = "2018-07-24T11:01:23.000000+09:00", + ExpiresAt = "2017-09-13T10:22:26.000000+09:00", + UsageLimit = 4324, IsOnetime = true, - Description = "SXXM3Y5XPxnjFhfkfYgvABxRhjV7rXm6F6onhtgkbe1I3fnSrAjiMpnuQgQNZWqLAFAWqZBqyjs43AAjNChMERBnJER6lOBQBwAgsTow2Z3Uka1wds9TY9Bp5VDJiBPB", + Description = "6B3OB7swghUIdkqUOY2HAI87h7tC8vMnTzjNmFWDzLZEPN7HQXwymFrbXYvN3cal4RO9jT63dRDxKNVoewLoaJggIMA5wXB3CTdPu3I6Gb57N6Bfk723xgVJhWc2FLmu9RV4wTQ1", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -477,15 +478,15 @@ public async Task CreateCheck22() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 2225.0, - PointExpiresInDays = 2621, - PointExpiresAt = "2019-10-29T04:38:08.000000+09:00", - ExpiresAt = "2023-05-17T07:39:03.000000+09:00", - UsageLimit = 6629, - IsOnetime = true, - Description = "NJcIKtWyeNc1zzlxW2hgOK8NI225RAsUHuuLFS4058hKDGnyjbxrF6zxkmTZedVWeLbSdWlORFkWxf1fgII7vrhxHZrOEIH6HNdDlfIrfFFwUdXhpSi4j72IcAxs47XeIzYlwiQaQGyn4Age91Y1cWNDBnv9RrzZK5", + PointAmount = 8165.0, + PointExpiresInDays = 3911, + PointExpiresAt = "2017-07-19T23:16:18.000000+09:00", + ExpiresAt = "2023-11-29T12:55:51.000000+09:00", + UsageLimit = 109, + IsOnetime = false, + Description = "6KgKFTgUMIqeaKPydQtxKkP", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -500,16 +501,16 @@ public async Task CreateCheck23() { try { Request.CreateCheck request = new Request.CreateCheck( - "ce5c4e69-e4c9-47f7-b8e2-81239073ebf5" + "17f5f16e-bd5c-4601-b52f-f3f2794c20bc" ) { - PointAmount = 4479.0, - BearPointAccount = "13049eeb-a24c-4638-bceb-db1ea417ee75", - PointExpiresInDays = 7753, - PointExpiresAt = "2018-05-08T07:35:43.000000+09:00", - ExpiresAt = "2023-11-14T12:55:05.000000+09:00", - UsageLimit = 608, + PointAmount = 320.0, + BearPointAccount = "4533aa8a-86c5-4415-bea8-1969ccba28df", + PointExpiresInDays = 3002, + PointExpiresAt = "2021-06-16T18:57:59.000000+09:00", + ExpiresAt = "2025-02-10T15:11:10.000000+09:00", + UsageLimit = 1661, IsOnetime = false, - Description = "oA9Wjz3x", + Description = "2D07ZJtROtnJyz65lsPnpU0js5rsIZ4cWpER3UtPkG2eq1I6SZr9Xo8DUROCVDxPSk72x92MmliF75MFhbZKuKGU7dTPisUgKnCVzFujd5tp1lylHobnm6HycWppeOG5c4bSq", }; Response.Check response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateCpmTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateCpmTransaction.cs new file mode 100644 index 0000000..033df18 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateCpmTransaction.cs @@ -0,0 +1,123 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestCreateCpmTransaction + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task CreateCpmTransaction0() + { + try { + Request.CreateCpmTransaction request = new Request.CreateCpmTransaction( + "svQQw8eNXwtPfKAW4UwDxt", + "22eac9e0-617d-4f2a-b158-0dfa150b9bfb", + 200.0 + ); + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCpmTransaction1() + { + try { + Request.CreateCpmTransaction request = new Request.CreateCpmTransaction( + "svQQw8eNXwtPfKAW4UwDxt", + "22eac9e0-617d-4f2a-b158-0dfa150b9bfb", + 200.0 + ) { + RequestId = "991edf29-a69b-4ece-a6dc-e8a1551ea22a", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCpmTransaction2() + { + try { + Request.CreateCpmTransaction request = new Request.CreateCpmTransaction( + "svQQw8eNXwtPfKAW4UwDxt", + "22eac9e0-617d-4f2a-b158-0dfa150b9bfb", + 200.0 + ) { + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "f1948afd-9664-44bf-b920-d03ea9398221", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCpmTransaction3() + { + try { + Request.CreateCpmTransaction request = new Request.CreateCpmTransaction( + "svQQw8eNXwtPfKAW4UwDxt", + "22eac9e0-617d-4f2a-b158-0dfa150b9bfb", + 200.0 + ) { + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "618efbeb-e4af-43dc-84b1-5f994e1f12dc", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateCpmTransaction4() + { + try { + Request.CreateCpmTransaction request = new Request.CreateCpmTransaction( + "svQQw8eNXwtPfKAW4UwDxt", + "22eac9e0-617d-4f2a-b158-0dfa150b9bfb", + 200.0 + ) { + Description = "inQrWik", + Metadata = "{\"key\":\"value\"}", + Products = new object[]{}, + RequestId = "01bf3c74-e24d-4284-9d93-789f49eab28b", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateCustomerAccount.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateCustomerAccount.cs index 6842400..9af2427 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateCustomerAccount.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateCustomerAccount.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task CreateCustomerAccount0() { try { Request.CreateCustomerAccount request = new Request.CreateCustomerAccount( - "13fc31f4-ab13-4552-8970-52a788378b0f" + "c2634781-e592-4c94-87e6-1be01b1d99a9" ); Response.AccountWithUser response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task CreateCustomerAccount1() { try { Request.CreateCustomerAccount request = new Request.CreateCustomerAccount( - "13fc31f4-ab13-4552-8970-52a788378b0f" + "c2634781-e592-4c94-87e6-1be01b1d99a9" ) { - ExternalId = "MZnFJMuPuuYDxHZdnik", + ExternalId = "LabY2vDzXzQx3sP8V6IT9VFC5bo0KXfPASw8", }; Response.AccountWithUser response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task CreateCustomerAccount2() { try { Request.CreateCustomerAccount request = new Request.CreateCustomerAccount( - "13fc31f4-ab13-4552-8970-52a788378b0f" + "c2634781-e592-4c94-87e6-1be01b1d99a9" ) { - AccountName = "AchiJbVP3ZTnJxIJTqpbj9hQa29LtqbzIUCtr", - ExternalId = "I5GH6wQi2f3OojTDEk0fitYgKzfXu0N7ZPQ6Ey6T", + AccountName = "PQ0hMJ4nPgNJOUuVI3xkUSOX0vTgyFK1FOp7pl9MWii2exAarzlUllrgsQZQAnUYeKIbZQuPYAKNLvTyMcIYlLoYSz5jRHNPv9LO3MtPyt1", + ExternalId = "nktL8AYkBvD7caRgncONv", }; Response.AccountWithUser response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task CreateCustomerAccount3() { try { Request.CreateCustomerAccount request = new Request.CreateCustomerAccount( - "13fc31f4-ab13-4552-8970-52a788378b0f" + "c2634781-e592-4c94-87e6-1be01b1d99a9" ) { - UserName = "u3BU56A0DovC2AWlgsj8", - AccountName = "O1bqHH9NHpqZwH1tkpyNDcuWxfr4xKRRC5UPfddKJfLPJmxAhDpkltxfpGBgKzLBWM", - ExternalId = "YifX", + UserName = "8Kje2pUTWzADNDe87oiAkJDB6ZsUUsk6umIdkjysmBoCy1", + AccountName = "d1e5PrxfXmPZX1VlVfqebv0ckwSJ4e9e0pY47yGoAwg28Msl4sq96mAewFZHEg2RF0uEHwK5Jbwu9JRSn5a7ymUxn4mfvD7ycun86BZW4IWD5GZy4J15w0ovSrq2HjQnZoVWhOdLDSpe9mEjTApY38vZyrfHaX2ePxiTIXhf26BicGgC0Q3onqPmyIzFPAF7SEHME8DlS2m5Kv5IbgTWsj", + ExternalId = "inGr0IGEeLzU5m", }; Response.AccountWithUser response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateExchangeTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateExchangeTransaction.cs index 62de5f2..39bee81 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateExchangeTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateExchangeTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,12 +25,12 @@ public async Task CreateExchangeTransaction0() { try { Request.CreateExchangeTransaction request = new Request.CreateExchangeTransaction( - "06a5d2f3-24ff-4667-bc8c-65ce1140d986", - "da109100-e2fa-4783-9783-8f2f87ea64e6", - "f970404d-f9bd-4e3e-8b56-45d980d67ece", - 6534.0 + "34eb72b8-1450-4f7f-a0bc-b0df266a8a91", + "5a96ff88-52e5-4ead-9094-60a96e58e86f", + "10083b2b-1dcd-4421-9c7d-1991ae9a8080", + 4059.0 ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -42,14 +43,14 @@ public async Task CreateExchangeTransaction1() { try { Request.CreateExchangeTransaction request = new Request.CreateExchangeTransaction( - "06a5d2f3-24ff-4667-bc8c-65ce1140d986", - "da109100-e2fa-4783-9783-8f2f87ea64e6", - "f970404d-f9bd-4e3e-8b56-45d980d67ece", - 6534.0 + "34eb72b8-1450-4f7f-a0bc-b0df266a8a91", + "5a96ff88-52e5-4ead-9094-60a96e58e86f", + "10083b2b-1dcd-4421-9c7d-1991ae9a8080", + 4059.0 ) { - RequestId = "367806f4-330f-45a5-9195-2ba133f57846", + RequestId = "1ed94b77-b96e-4da7-8a41-03a71ec2d0c5", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -62,15 +63,15 @@ public async Task CreateExchangeTransaction2() { try { Request.CreateExchangeTransaction request = new Request.CreateExchangeTransaction( - "06a5d2f3-24ff-4667-bc8c-65ce1140d986", - "da109100-e2fa-4783-9783-8f2f87ea64e6", - "f970404d-f9bd-4e3e-8b56-45d980d67ece", - 6534.0 + "34eb72b8-1450-4f7f-a0bc-b0df266a8a91", + "5a96ff88-52e5-4ead-9094-60a96e58e86f", + "10083b2b-1dcd-4421-9c7d-1991ae9a8080", + 4059.0 ) { - Description = "ORiCKaN1GSBkTmsnETZgON7wI25X", - RequestId = "87cb461b-ae44-4a7e-b4cc-0117b77b58c4", + Description = "muUL6pb761IWS7zT3jmF3XMzgKDKO5o6UqQsbMF41dYUnemzRdROKbGph7rDrumGN6tQ3vZwFKRF7w7plclcWB9bNRwQ0LABzLS5AginlSJbgCOpN21EzYv53e8C68gL6nh3hboA1VaXQqYz47H8v5OYX2Bb7kgjpYtpWxkJ", + RequestId = "b90e2715-4a1c-4932-9d36-3e10f6991b1f", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateExternalTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateExternalTransaction.cs new file mode 100644 index 0000000..b18bd86 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateExternalTransaction.cs @@ -0,0 +1,128 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestCreateExternalTransaction + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task CreateExternalTransaction0() + { + try { + Request.CreateExternalTransaction request = new Request.CreateExternalTransaction( + "4d70948e-0eee-4106-8e8d-bc6649c47b53", + "0cbf603e-3c5e-4002-9269-f7d8605c8206", + "48adf095-84cc-4077-9a20-feb60d59bc49", + 6744 + ); + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateExternalTransaction1() + { + try { + Request.CreateExternalTransaction request = new Request.CreateExternalTransaction( + "4d70948e-0eee-4106-8e8d-bc6649c47b53", + "0cbf603e-3c5e-4002-9269-f7d8605c8206", + "48adf095-84cc-4077-9a20-feb60d59bc49", + 6744 + ) { + RequestId = "6fe4a33d-aa7d-4a78-8d85-8defb10311e0", + }; + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateExternalTransaction2() + { + try { + Request.CreateExternalTransaction request = new Request.CreateExternalTransaction( + "4d70948e-0eee-4106-8e8d-bc6649c47b53", + "0cbf603e-3c5e-4002-9269-f7d8605c8206", + "48adf095-84cc-4077-9a20-feb60d59bc49", + 6744 + ) { + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "1dad4734-4d0f-4d4e-b3e0-47624d602158", + }; + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateExternalTransaction3() + { + try { + Request.CreateExternalTransaction request = new Request.CreateExternalTransaction( + "4d70948e-0eee-4106-8e8d-bc6649c47b53", + "0cbf603e-3c5e-4002-9269-f7d8605c8206", + "48adf095-84cc-4077-9a20-feb60d59bc49", + 6744 + ) { + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "b7a43332-2479-4345-a5f2-26cc71bca74e", + }; + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateExternalTransaction4() + { + try { + Request.CreateExternalTransaction request = new Request.CreateExternalTransaction( + "4d70948e-0eee-4106-8e8d-bc6649c47b53", + "0cbf603e-3c5e-4002-9269-f7d8605c8206", + "48adf095-84cc-4077-9a20-feb60d59bc49", + 6744 + ) { + Description = "EKMYsRf9vriYiP8HndtLKgFWIeB413C8zcpa0a0i", + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "911b5ebc-fbf0-4ef5-adcc-29f4f57497b3", + }; + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateOrganization.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateOrganization.cs index 805bfc8..9e8ac6f 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateOrganization.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateOrganization.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,11 +25,11 @@ public async Task CreateOrganization0() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ); Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -43,13 +44,13 @@ public async Task CreateOrganization1() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - ContactName = "fnz5e3bjXKldANGzSZe49qKV1rholLnfHAgpNJKDDEjuzSmETPUL6TDRxNmjKWPDEzen9VEh9JKwUlzsxb9tQKSZdMATJHlP3s2aiyvcn732KUYpvpwWJTv2DUcmsWBTf3SfgLVNlOhNoRUioebBno3HZhnyNZ5Q77U04aLs4hmy4C28WnCRfz2leovb1R7O6QOgboW2zpcaLxa2QZma6CRo8n", + ContactName = "vnEoyfpAANnkoel9aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra9", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -64,14 +65,14 @@ public async Task CreateOrganization2() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankAccountHolderName = "ラ", - ContactName = "9", + BankAccountHolderName = ",", + ContactName = "KkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdn", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -86,15 +87,15 @@ public async Task CreateOrganization3() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankAccount = "474481", - BankAccountHolderName = "ヒ", - ContactName = "wJ1udEIb7zDJ6KZTEk0mDRGqd8jGih", + BankAccount = "3956213", + BankAccountHolderName = " ", + ContactName = "iyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45c417ClVPZadCz21oTLg0Zh082rSUmgTJgltXUvopMAE6nKVgCC79b4Ei190OQ71CLczodkHUHlo8UiDVjyL8K2mxNxSNDBAB21jRDnDfUt4YgIyZaTsiHOmcCShoExxXDzwmu0NmtxroKV", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -109,16 +110,16 @@ public async Task CreateOrganization4() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankAccountType = "other", - BankAccount = "27", - BankAccountHolderName = "ソ", - ContactName = "3QYDG6CZS1PVe5LZzi2NmWBluHrzflOytNd3ROmH9nMfAHnX3LOs6P3dxLhDjrt4CFESWJnPCLUxGLtrgoghS3pPHE574eeX1ksH4R2MgyW6z149JBRZmQUgzecqWdDVSstoEtPVoykbtA6", + BankAccountType = "saving", + BankAccount = "4478", + BankAccountHolderName = "\\", + ContactName = "xL5ooBCUmbexHlOYPdRDRXfcFEKebPAHiatKRmL7K8IMJIBW1vB1RC8WQ75Zq2CPEph5LyiHrKKZHYeA6KMsRSBkbfNhFwjSSUkqouGV2ULftf3KLiOm0u6OdTYvY1WMa6BMdHbor9Bi8VjYjeAF8N8XvRYyNjj6LzPNoFY0NPc7gW3tdaerbfAUj6MGuDCQRgbbh69IfOOqdFvcvTYHWhMSc2J", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -133,17 +134,17 @@ public async Task CreateOrganization5() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankBranchCode = "977", + BankBranchCode = "441", BankAccountType = "saving", - BankAccount = "1718", - BankAccountHolderName = " ", - ContactName = "hWYdlIHfSBBKI1KQl4cK6HLesoN7AsxjaX4bkzoW5SSzFCKjOEE829PJZq44v95w5OTBAsM3ixdWcd35lzGg9k8zX5Zx6rdzZ6Kiw60EKpO7FL05ARSiRG2UPRPUxc", + BankAccount = "081", + BankAccountHolderName = "2", + ContactName = "KjX0wbEINtuhWyJmxhctiEpL1KlL20SY28CEIpXvCz2lX0WFgkUTJYHHOr63hjnglJCcSZdRjCOwyap0lsb8d4Dc5yMU1TN0yX6wxY6IPoPyEr8klncfGkEwHBWOqOmjPQjCJIqduyEzfF4ihEMnqIdNLL8T5msTmgqj", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -158,18 +159,18 @@ public async Task CreateOrganization6() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankBranchName = "w9rvtxOfCP20hUm1E2Nlz5V1CO5TSFyNtopqI6bCrDgQ", - BankBranchCode = "409", - BankAccountType = "other", - BankAccount = "05", - BankAccountHolderName = "」", - ContactName = "v10dzqDmxXKufPIjjJpzSXKPSRMVYMVxniANdM0yy6srRZNC9bYJUFWp4SJDd9Vw0ghvUwHY4GPMgqa4p3NBV6jnDEmNinmBAkCQlWqd4VgtaT7nx9nCCSGOYqsqY3PQB7j8S1LcJM99jV6h5DQ4TL9sXbFiutZ4wFjGxBLsRpox6uXLc6he8Kxv6FPaZ8I6AxiybIUdjn2JlMSQ6V8dRYSFDiggsas4Nm4Pbqn0MLycuAIyd8Tc91", + BankBranchName = "81RXJ34GFY2SrpQfm9Le0rSPWlrPa8fbLwdjVaS9JydpHqXjqW7D3uCGCdE3Z7g", + BankBranchCode = "343", + BankAccountType = "saving", + BankAccount = "4492186", + BankAccountHolderName = "\\", + ContactName = "JxcGB9NLriuIsMTY", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -184,19 +185,19 @@ public async Task CreateOrganization7() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankCode = "1245", - BankBranchName = "A0BEPaxu5hz8quH88gYqQC45YQseyms9QyHVorEq6zLZyg", + BankCode = "", + BankBranchName = "CUoOEa9YZaUNPTMagDSPeHLGCGYvgqbqCIdoPTyGfjAlvbOwBRftL3mTfJ", BankBranchCode = "", - BankAccountType = "current", - BankAccount = "39240", - BankAccountHolderName = "\\", - ContactName = "e1DJRmWCvXV5f7NFxRTTWOKh4cp2t8rtdj0F82", + BankAccountType = "saving", + BankAccount = "381", + BankAccountHolderName = ")", + ContactName = "vnht1UycVdhwjqe7Rve16qe5BUa3mrtCxkktMbdZ0Ff5nebRZC0vDYNEWMf", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -211,20 +212,20 @@ public async Task CreateOrganization8() { try { Request.CreateOrganization request = new Request.CreateOrganization( - "2NE9OohrFLhvABt92YjeNGkeRyZCxDw", - "yuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol2Udeu5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6vD3BTnNcaIv4Cy", - new string[]{"eb110732-d01b-4e84-bb07-9a71c68d5516"}, - "iGNeSDJueW@NAF2.com", - "iLhkB08mWo@SEw4.com" + "50fssjoNHBAUn0qZzC", + "WIZlu3nVCPUHg3HpQOkzK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReMbbVX8HS4JwKvfQBXbwG5FfObbKUS2wO8JUS6TcMNwfudd0OcDN26kEZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpIzZX", + new string[]{"1e20c26d-f316-4303-b320-cf03107b778a", "e4061717-7eef-4682-98c7-863a9dd625d3", "3610bf99-3328-4299-b791-06e0ba08e7e1", "19a5baca-a2d4-49e9-97a5-4a376b4ca013", "de322bcf-9d2b-4d3f-95ae-f14bc950aba5", "b03fef9c-aa30-49f6-8b51-e5b19edc6a8f", "a10ea5ab-39b3-4d99-a72b-04c0fd0e8f90", "94b385a8-f766-4987-8fb1-0651a70f5b24"}, + "SAIUcA7AjS@SLuH.com", + "Yzu2Ra1BME@r62g.com" ) { - BankName = "huu2d72PSRBNNGTP71wcJLJGkIvTZnRNAv7oeQjUe", - BankCode = "", - BankBranchName = "z1G0bwCFurxmaLHHuXDOcuycP", - BankBranchCode = "", - BankAccountType = "other", - BankAccount = "04", - BankAccountHolderName = "6", - ContactName = "yWZt9ZjHKqLir6qmCF3zfoEN4hG6jzrPFiN4YTSJ9o4hVc0u6tzaZ3sbYKCNybmAlkaNJiOvuRswwQSmiJco3KwhjqpMqyENnnotJKNM2DvQSu06FE8juzeNINZktFZU0JpHpSrpNbF8O3WzYFSGY9bWV5jbNBEz14f9BIpTXI2luGWaGy1CoCYoYmaLr1BLYdgsrsB7nf3z7z76OYqLZhd2VmnwZ1YQA", + BankName = "xXSVHRY4YZdsEswklf9tWgAr9K", + BankCode = "8375", + BankBranchName = "eefEvU98BI4BdtnYVFOF5IXA6lNw66Yqs62ry4EX0H5SsjBGi2vt3IVLujf", + BankBranchCode = "583", + BankAccountType = "current", + BankAccount = "821853", + BankAccountHolderName = " ", + ContactName = "5hc29pv4sZBooZY5wA4Og2kdAYLVTxSOsaSsUmdY0CLcfoUMFSIdEJ", }; Response.Organization response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreatePaymentTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreatePaymentTransaction.cs index 4a3bf3e..3bae94b 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreatePaymentTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreatePaymentTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,12 +25,12 @@ public async Task CreatePaymentTransaction0() { try { Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "7f35485f-53c3-4f41-bf9d-9e33b1d415f1", - "93cc8961-0be2-42f0-a8fc-6d79e7879700", - "a0cd1f40-75ea-47d8-9033-dca08d56be14", - 4654.0 + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -42,14 +43,14 @@ public async Task CreatePaymentTransaction1() { try { Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "7f35485f-53c3-4f41-bf9d-9e33b1d415f1", - "93cc8961-0be2-42f0-a8fc-6d79e7879700", - "a0cd1f40-75ea-47d8-9033-dca08d56be14", - 4654.0 + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 ) { - RequestId = "dcdd1b78-cb75-4413-a8e8-7279c66b08b9", + RequestId = "caaed78e-be70-4d36-ac89-c0a64bc1ca0a", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -62,15 +63,60 @@ public async Task CreatePaymentTransaction2() { try { Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "7f35485f-53c3-4f41-bf9d-9e33b1d415f1", - "93cc8961-0be2-42f0-a8fc-6d79e7879700", - "a0cd1f40-75ea-47d8-9033-dca08d56be14", - 4654.0 + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 ) { - Description = "RsNNOdzmZ5nbPQzPRirLmp7HiQajpl09d6QIiaL5c40GPi4ivBi3eJhDgAiQ5RhXwEfmyakw", - RequestId = "1f1618df-3a43-4fe9-a832-89a7ab8b750c", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "375e0e3f-d49f-4d1b-8364-25e1c287d7f7", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreatePaymentTransaction3() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ) { + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "edfecf7c-6781-488d-8d75-c0e2f323c41d", + }; + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreatePaymentTransaction4() + { + try { + Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( + "72eb3c2c-8c93-4f56-9365-264bab09ef93", + "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", + "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", + 7125 + ) { + Description = "jQ03lDRu1dHypEu4pqRk9KXy", + Metadata = "{\"key\":\"value\"}", + Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, + RequestId = "eecf1f7e-aaf7-4b0b-b89a-cd669deb41c1", + }; + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateShop.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateShop.cs index 415b8cc..5262b46 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateShop.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateShop.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task CreateShop0() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ); Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task CreateShop1() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ) { - OrganizationCode = "--0-L7--IG", + OrganizationCode = "y4-RP2-WA67-4397-5", }; Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task CreateShop2() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ) { - ShopExternalId = "OKYuUs7zf9dIsiva1vYlz4sIXfB3e", - OrganizationCode = "HmGj-d15u-ph6a---Hk2-", + ShopExternalId = "Ogp1VTNstKsbk2wvZcZ", + OrganizationCode = "Jk0-n1o-al", }; Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task CreateShop3() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ) { - ShopEmail = "LymzX1iKAB@zsal.com", - ShopExternalId = "h9et3sJPwGPZVdfeHb", - OrganizationCode = "u88017XJ-B8-01N--", + ShopEmail = "d5uwOg53j3@Qic0.com", + ShopExternalId = "yKLnZxaZi9", + OrganizationCode = "GG-", }; Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -93,12 +94,12 @@ public async Task CreateShop4() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ) { - ShopTel = "042830-8605", - ShopEmail = "ncEWYebt4R@UGRq.com", - ShopExternalId = "T3wcuceySCabxrgTXSxZbg1Ud9jBS", - OrganizationCode = "x3o", + ShopTel = "008767500", + ShopEmail = "SdiADG37ey@dGEN.com", + ShopExternalId = "PuSUGCPNHip0Y3", + OrganizationCode = "tq-o-ae-Y2-D-mBbpS3eFh1jdy-8u-v", }; Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,13 +114,13 @@ public async Task CreateShop5() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ) { - ShopAddress = "nO39WNWvjXlHUhCIHkbLQ7KL6y3Sdoxdn1tpYM1z5XMrmRY7bQCW9sPYWAKIaPAnlgG8mho7qKjeP1Vs1el3tVDmtz0qcHqLIsXtLIzc5kRp3WnRoU2x23XKfAMBShU6I6qbRRo0KsKQjbIFpDLYbMMvlh9JCT1xGcQLRIyKzcfWhCzi1Z89pSvPCqCpyLyZq50fssjoNHBAUn0qZ", - ShopTel = "0501-709580", - ShopEmail = "3nVCPUHg3H@pQOk.com", - ShopExternalId = "zK7LlGZ5l2cQL9XINJ3Yd9vs5R5vReM", - OrganizationCode = "G6-2-T-s--d5-wd4-e6mKeq-3o", + ShopAddress = "fX1fzmKZw4jAX5TdVMZA3FsBWHTaR7q8iHovbTWoPNbCUX3WmvU0lnYW7MWulxJqejEoXiemEzy22TP2wtSY9IoDSrJUA2sSTBsOwjVmr0bTbO79fqhITnnz7WaCAiQd9B8sle88sl7rSWKN9oQjHsNX48VkSyiuzE1L2wv36YuE4jwp0IiR44I5KLiO", + ShopTel = "020263-131", + ShopEmail = "xtTGifN6Kr@raD5.com", + ShopExternalId = "ojwDmQdLNOKHIlDiaOh78QfhNbZ3YfGh", + OrganizationCode = "uE1", }; Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -134,14 +135,14 @@ public async Task CreateShop6() { try { Request.CreateShop request = new Request.CreateShop( - "qfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cU" + "5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0t" ) { - ShopPostalCode = "229-4168", - ShopAddress = "EZNJtfvLzUTMMVxGv3INa5f54YI1Ph3OUBAsVaG6TxK3slQw2Vv1qEnKcaw1pz9vX015UD9qqTdXnkHVwtuWRPDBo28vDsYr2EOFyjAKpCpI", - ShopTel = "0787-3037-873", - ShopEmail = "waJTi7OUK0@vKQ1.com", - ShopExternalId = "3gfO1QSAIUcA7AjS", - OrganizationCode = "hDw5-H6baOe-55okG-", + ShopPostalCode = "9801535", + ShopAddress = "caXjUtBcNe9XyY4wthFo0glXBErIUB1p7aPMzXnAdDrY96Gn0OAQ9xSN0zfKx7ivixiVqjgvBNcsQLQxAtJmVTcXWtKUzkNd35gyuBKlwozbM8BIp6WWFtoNM3mKKWyblmmAHRSYCV0EDw10SY48ZoA8oj9alrEKYDjBWPKCwbirzvScUvjsqVkc", + ShopTel = "006-0992-667", + ShopEmail = "g0ANEHCj5e@M805.com", + ShopExternalId = "wtsg2NkJBDvuxWoqdLq3", + OrganizationCode = "9-3k68lq0O9X6D-pI", }; Response.User response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateShopV2.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateShopV2.cs index e56d87a..0321d4d 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateShopV2.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateShopV2.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task CreateShopV20() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ); Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task CreateShopV21() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - CanTopupPrivateMoneyIds = new string[]{"66b1bf08-6eb4-4a31-89b7-8424bf10a9e0", "9bd23843-046c-4e07-999f-75d6adb23850", "f800985a-db5c-40df-8261-fb64b35f64a9"}, + CanTopupPrivateMoneyIds = new string[]{"9471e56a-e5bf-4b59-9250-43c38c555871", "b344271d-479b-4076-aebe-edda3e856731"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task CreateShopV22() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - PrivateMoneyIds = new string[]{"5c74ab8e-1843-4493-ba83-af32038bfd97", "2f938dfb-3eb1-406f-944c-b467188422b0", "8dbbd2da-3768-4b10-a030-93b80b31f9b2", "83feccf2-b4d3-4305-950d-e86dc8014023", "635b9e67-be0a-4854-8a9b-432ea0ad1e67", "c4481a5b-e987-49ec-ae29-aca433910309"}, - CanTopupPrivateMoneyIds = new string[]{"52e715ad-7074-48be-8e58-87287390ced5", "1d4252f6-deef-4390-b05e-44cdce27c897", "fad1e6bb-f541-413f-9725-03c5287c63af", "19621cab-7b7b-4ebf-9336-f3eeab1d4a99"}, + PrivateMoneyIds = new string[]{"f6122587-4c7a-4264-a11f-4a13c46a26f2", "3a116368-839b-4e5f-871e-cfa95bb93e48", "0c0210b7-3a0f-48a9-98cb-77031463f77e", "aed499ce-ae17-476f-aec7-9e7e1692fc44", "d08801ac-367c-4f7b-b0f1-3771cce36518", "af67b3ea-60d9-4eba-95e1-3b34202928b2", "a935ccce-0592-4d20-bbce-9598bb026337", "c02f2f1f-cbea-4ee0-bf10-38d7b41b802b", "62852894-9617-4fe2-948c-755bb68c13c1", "aebf60aa-51db-45b8-b385-cc28e8968d8d"}, + CanTopupPrivateMoneyIds = new string[]{"124977b9-028c-43c3-9cea-e122d209de59", "6aac285d-8b03-4ce4-9be8-9d597fd276f9", "820807d2-8d2c-44b9-9a74-4c87629a8e57", "84fec1e8-dd14-4e3d-bccd-dc41640dcdcb"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task CreateShopV23() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - OrganizationCode = "39-0o-4iVgf", - PrivateMoneyIds = new string[]{"dcc5bad5-96e9-453d-9f1e-e9c4becfec56", "3f6e336a-e979-424c-9838-89081e841925", "759594cb-ba7c-4cb2-adf8-e40b0eb71992", "2579b04e-f9a3-46f8-9f7e-2cd382af6b4e", "68cd4814-ef0a-4544-bb7e-9842751d1e41", "4036b942-22dc-4b91-b287-8428a06d081e", "bca90331-d06a-4805-9244-88bc337b5199", "d107ef96-af6e-4e44-a6d5-f316153c7cf4", "fcd3d140-c97d-4fb4-a55e-d2d9e04ba167"}, - CanTopupPrivateMoneyIds = new string[]{"a9a4f779-01da-4d00-a154-1ea01bd44ff3", "6a92b995-2369-4914-9248-e14fee0a516d", "8eae4ca2-0f9b-4aa4-a3c3-4008d482fdd3", "776a6540-12e8-4d6f-8fc5-3478555fe31c", "856f107b-7b23-4601-b820-e458666b2044", "5f799fba-468c-44fa-b76d-d45c84ad7475", "ec2b84bd-8aaa-485f-b040-9d8a5939c54e", "9c48a214-5f1e-45ed-b43d-b578db8c5372", "2330ade0-9b6f-42cb-8956-8c3c36f5c9dc"}, + OrganizationCode = "A5-lRgrZc--HqP-iMbc", + PrivateMoneyIds = new string[]{"a3271672-f56b-471a-98aa-65564618cc1e", "c8f7459d-a5e9-449d-ace8-6fc9e9cba764", "6b634b51-eafc-40d7-8b75-24b70f08c3fb", "70fbdfca-581a-4112-9eb4-974e68cc9397", "ad24f7d9-005e-4e3a-a9a0-82f239cae2e0", "38c61dd8-d7f2-42f9-90bd-1dafbfea49d0", "d61de8b6-21ac-4e74-a1f1-983e9e44007f"}, + CanTopupPrivateMoneyIds = new string[]{"ad5ad092-2ded-4287-ba36-a3a00e00fce8", "b03b2622-ff73-496e-9441-6783a3e201a4"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -93,12 +94,12 @@ public async Task CreateShopV24() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - ExternalId = "k7sDu4lw8ZxL5ooBCUmbex", - OrganizationCode = "Y-A4-y-7", - PrivateMoneyIds = new string[]{"66b94401-91cb-45b8-89a6-05232fb8fc4d", "09820aca-4a49-4e29-8203-c63b254b0b11", "44c1b2d7-a50d-4fa1-b128-abf658c9438d", "3ac1a0c2-501e-4131-92ad-e3a05697a6bd", "9bd6f2c3-db38-4ebe-97d1-542538847d23", "7ead4924-107c-4f0a-9b37-ee299ea3b001", "a36e9dae-1227-4435-a503-745af358388f", "bea8478f-ee71-47b2-bec3-cfd0e1fb65a5"}, - CanTopupPrivateMoneyIds = new string[]{}, + ExternalId = "9", + OrganizationCode = "4j-Wx", + PrivateMoneyIds = new string[]{"588e6066-1249-4a7a-aa31-8b78ea56d95f", "f8f3d665-a9ed-46ee-b244-a52a9e0abf92", "7606ae85-61f8-4bb9-bf50-cca437203993", "5cbf0329-debe-4b87-9dae-d98396231fba"}, + CanTopupPrivateMoneyIds = new string[]{"f8690721-9d26-4237-887b-4ed00a80a8fe", "b8198af7-edbb-47cc-9835-4440292f34ec", "9483c97f-4d8f-4577-aed7-9ddde74d6596", "a82d0d5a-b54b-4a75-9757-3a664f0d00b4", "21932524-ccee-4d35-bbf7-3c4e94686200", "23d1c950-51f1-40b2-b2ea-bece15ca43ab", "f917069c-5732-42a2-b8a8-a700a3b13851", "96f5f666-33d1-47fe-992e-4dcc4403f06e"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,13 +114,13 @@ public async Task CreateShopV25() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - Email = "Eph5LyiHrK@KZHY.com", - ExternalId = "eA6KMsRSBkbfNhFwjSSUkq", - OrganizationCode = "Rz-n--Pw1f-c-0D1a9w-7-", - PrivateMoneyIds = new string[]{"09002d25-f392-4a5e-af17-343a376f552c", "2bc7ad5e-5319-4283-896a-c26580b039c1", "61e4d0c6-291e-49b8-a04e-edaacd62461b", "880c547e-4db8-4784-bd9c-c72452614c58", "aa7103db-555e-4f97-83f6-10951a42213a", "06c6209d-9452-4005-8559-188daa5037f9", "1eb77290-dace-497c-aa6a-58368a5aa9df", "65ddcfac-36ff-4f91-8006-0185821c43cc", "2a81243c-f516-457b-ba2f-7c9921bdc850", "7473d8ce-99ef-49c6-a214-dbd9c82d375e"}, - CanTopupPrivateMoneyIds = new string[]{}, + Email = "Q9Qr2gs4rA@yEVt.com", + ExternalId = "2ws7WkJzpgGU", + OrganizationCode = "4--9C-y-6w11-4JJ4508E--v", + PrivateMoneyIds = new string[]{"87351271-8785-4d74-b2e5-39ec66d9e4c9", "6a7b0917-ff6d-44ff-a755-e80790762692", "8d97b201-3ece-4d84-ad81-614c0b498c21", "de5ac891-ca65-458d-9396-0aaad9126b4b", "e6a85f45-8de6-4894-9855-48e371f38232", "24bd4b64-9cd1-4685-85a3-f1f81d7cd4f5", "c3129723-fcbc-4932-9c08-da0a75523a7b", "fc22cab2-08a6-41ff-a697-14457c7a335e", "2e917e5c-45b4-4ee2-8721-3f2d3bed64ab", "b605c058-506e-4b9a-9426-b9f3eda43f72"}, + CanTopupPrivateMoneyIds = new string[]{"e49713c1-c575-4126-9f58-307ad2d38663", "d0d70740-1da6-4f1e-953a-9660ca62e2fa", "cddbd77c-4f74-4a04-801a-c6635623a96a", "6281c895-9f10-4470-a3fe-3ac4ee273363", "dd1c925c-91c9-4ea3-baf6-198484160e38", "5ca17e0d-6223-4890-942a-b792ed5d306a", "0f789625-34cb-417c-a2a6-d2315839ad64", "44c720af-71c9-4a63-a851-f90160076ecb"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -134,14 +135,14 @@ public async Task CreateShopV26() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - Tel = "0019-7734152", - Email = "bfAUj6MGuD@CQRg.com", - ExternalId = "bbh69IfO", - OrganizationCode = "Y--PYyJc--8xcJ4YtFxT6Jyvs-j", - PrivateMoneyIds = new string[]{"1540ac9d-fe7f-4170-a208-488bf38cfd12", "f51edb4c-f60a-4203-b12a-84cbd65e9186", "525929ec-3fcc-4db2-95b0-ce5349c2a599", "c5c9497d-0359-43a2-bb3b-2d3244b7185d", "1e880938-b29c-42c3-bd18-02c570aa5992", "1cdc6ec9-1e1b-4df0-a358-59f6a932fdfb"}, - CanTopupPrivateMoneyIds = new string[]{"d600a0fa-4232-4892-ac58-6eb0928a23a7", "038f90fd-cad7-45ac-bdc6-be94e7e9c312", "0c82b9e7-d4eb-4287-9554-14ca94221059"}, + Tel = "07049-473", + Email = "u0LI4T70lQ@wB45.com", + ExternalId = "3YpOK96EoFGxVJNTeRlFM4", + OrganizationCode = "-T7X7Iq548-0s-9DH5Z5HMjk", + PrivateMoneyIds = new string[]{"2f7af162-5f3f-478b-8ff2-d4cd3767d0ea"}, + CanTopupPrivateMoneyIds = new string[]{"ca77e6ea-90c6-4df7-b204-65890daa6241", "a81beb64-268f-440b-a20f-a8e39d890fc0", "e4f8b6fa-e2b5-4337-a6da-dface2f50d4f", "e0c290d7-bf29-4073-bc2c-b4c4db750772", "2fbd2130-19ad-43c4-ad99-c5a2dae95fea"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -156,15 +157,15 @@ public async Task CreateShopV27() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - Address = "HHOr63hjnglJCcSZdRjCOwyap0ls", - Tel = "078431590", - Email = "MU1TN0yX6w@xY6I.com", - ExternalId = "oPyEr8klncfGkEwHB", - OrganizationCode = "ID5OJh1yuUHt9n-181", - PrivateMoneyIds = new string[]{"0aabb158-4a4a-4fb3-9b07-7134c60401be", "692d1b02-cda9-4b96-8780-8803e42e8bff", "03ae9046-39fc-431f-995f-8cb213d594d3"}, - CanTopupPrivateMoneyIds = new string[]{"415071f2-dff0-4651-8390-f0662b2a425d", "c5e334fd-ea6d-4c39-96cc-577b76b60b65", "221cfa81-0930-4e60-8f1a-35fd2e8d6a2c", "8f0a1472-8820-41d3-9c50-bb9c9e705bd7", "bb4edf12-fdab-4899-ac7e-41f2c7163d7c", "96d6d290-0650-4413-abab-6e9215947c89", "6b22bcbc-e461-4438-a621-7198f3244ce2", "543db74c-e777-4aa1-a423-d48a8d6d30ea", "628e4b56-4087-4eac-a18f-f2531b037893", "fda332b9-844a-483f-8009-3e797f99c8e4"}, + Address = "9M12BOno1AcjM96oftC7mHhiSDgXKvVy5paxKD2XcOfyMo26iqol80j1t4n3lpnoezOx6Ov6eGwjQCqxdtQnDY4S9N4HhJ5rCsXRcUZY47cpIh03BvqB7CzLjYHoO28zEE65UlKtMCe12MUV2dxrA2428zEWnFZLX87qtedPzV8NdiYCurcmVOPZzwMWHgQ0VESfspW9b9NBdczTSynCfTiWLEN2pEbq7ZeB8PVJkE9NzaeTptZ5k", + Tel = "0917771", + Email = "QnEnTlLyub@wibc.com", + ExternalId = "5", + OrganizationCode = "-L5-fR-en-93os8-3--MN6", + PrivateMoneyIds = new string[]{"41cefbaa-2fc0-427a-a24c-a9c683f930bd", "03dc006d-40e6-4da4-bf2a-6fc616a82ad3", "fe00a37a-5eb1-4a5b-b570-f8e54dae3bac", "48a590f2-9c1f-4594-99c8-b36826174955", "d1399dde-1935-4381-b60f-a1052fbf5581"}, + CanTopupPrivateMoneyIds = new string[]{"4df5394c-68ba-4a20-b857-f60573da7db8", "fc8c193a-7259-45bb-aaf1-4e981c4746b1"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -179,16 +180,16 @@ public async Task CreateShopV28() { try { Request.CreateShopV2 request = new Request.CreateShopV2( - "aDgdNSfmE5De5bTvMyHpd2S0WD3FaqRKAgoYEGpNOGzwWmNqL0QHxylFWlu94S8FVSDMY5BU7ZXRTfnNFoNra90XKkUB3tuq1X9Hm0SHBKCUruJxi1ST1WXtfeKSzrq1Zc5Ju53UYOCwl5C8rEq5yNfh8NoRe5rX0rVCmpqdlLHNNlbdnW1ooZFRDSiyltrhPzNi7jenj4X3xdXKxR7POl5XLEB6rdcoyFq3Dy2RXyPUAe3PgOIxNaz33MDlMm45" + "wJJuJPCjlaztijN3vebjT869" ) { - PostalCode = "408-1828", - Address = "qW7D3uCGCdE3Z7gIcLSudPl4JIrQmLFWJxcGB9NLriuIsMTYyCUoOEa9YZaUNPTMagDSPeHLGCGYvgqbqCIdoPTyGfjAlvbOwBRftL3mTfJhTjDs9c8QNUGvnht1UycVdhwjqe7Rve16qe5BUa3mrtCxkktMbdZ0F", - Tel = "0513595039", - Email = "0vDYNEWMfx@XSVH.com", - ExternalId = "Y4YZdsEswklf9tWgAr9", - OrganizationCode = "-oz6-50bY", - PrivateMoneyIds = new string[]{"77ea7c81-1436-46ec-9cdb-c74eb0b40bf7", "0245c836-b300-43b6-8259-96f192bcde73"}, - CanTopupPrivateMoneyIds = new string[]{"9c2c3f99-a00f-4d23-b27d-6fac3cb56886", "d6e59a72-5e00-4af9-805d-1780db700134", "78ccd645-4814-4d28-89d8-b1a1e25f8b30", "cd1cc0c8-d2b5-47d3-bbf3-0140203a46ea", "d48a7b26-9813-4c42-ab47-0390ed9ad8e9", "20cac7de-6cb2-4984-b674-6c33ba3a7a49"}, + PostalCode = "5802558", + Address = "q3NykiRPYO2oQiAYMcKkXBWEu4RSjxgCW3jFlgob7yobgqdqFleVhpCebd", + Tel = "00-31697", + Email = "2YjP5pod5Q@aLCZ.com", + ExternalId = "TmFLxumOn", + OrganizationCode = "7--pfe--nh-1--O53q7A-p--", + PrivateMoneyIds = new string[]{"0cb43db5-6894-44a5-9b49-22a903143749", "34587466-b211-450d-8562-9106f3443e20", "5fb06821-f6ac-4661-9293-1d97e10a73a6", "f1ebe083-31ec-46f0-9a7e-0ae407fca1aa", "9c48dea4-df28-4868-a0bf-7d54a6ea395d", "6d396310-bfd4-4728-8d7d-072cebe6258e"}, + CanTopupPrivateMoneyIds = new string[]{"eaaadd70-1583-47d1-a6a7-b26fe4ef8bd3"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransaction.cs index a8bd84e..c63e3ef 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,11 +25,11 @@ public async Task CreateTopupTransaction0() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -41,13 +42,13 @@ public async Task CreateTopupTransaction1() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ) { - RequestId = "12873ff0-f0a7-4f8d-b2ad-25cf642cb155", + RequestId = "6924d76e-d35e-4341-9347-ad42f73d2590", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -60,14 +61,14 @@ public async Task CreateTopupTransaction2() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ) { - Description = "7ktZcH", - RequestId = "cc474057-b105-4273-8bda-3c8a04992c7f", + Metadata = "{\"key\":\"value\"}", + RequestId = "78112281-97f2-444c-8284-68336975e905", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -80,15 +81,15 @@ public async Task CreateTopupTransaction3() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ) { - PointExpiresAt = "2024-10-27T05:25:48.000000+09:00", - Description = "EtZX9770nlSO8H2DCl6imPJgn2XjYsZUpQvLebh65Hdtxmvs4SwxRthVVayjO1th3s3e6fayZ2E32vm3RMvvWttu1PJb3d04IfskzbRh2KXDkJqy1", - RequestId = "7508f855-4d79-48d0-9202-02e1456064c7", + Description = "eptreugpuZPDhn3kvKQdinTisU7JGahMN0pspm5VBpWaMfH3OlTb5uoxVylmhf3ESdF0EHZGgpE19g89rUgV81h6fR4XX", + Metadata = "{\"key\":\"value\"}", + RequestId = "a152d341-467e-4752-be06-08e5e80c9901", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -101,16 +102,16 @@ public async Task CreateTopupTransaction4() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ) { - PointAmount = 3784.0, - PointExpiresAt = "2021-01-16T15:18:32.000000+09:00", - Description = "kyMSdmemZcovbEUc9TiM3DTSa7pJlo8JS6mIVfCl8O6XTpGUPEJOaNnRanlNyuKHWuXq7zEzVgAAIhzrVmMQ7zQf4j1Xl", - RequestId = "4f57728f-a26e-4378-b631-80dc19de3382", + PointExpiresAt = "2018-08-02T19:22:22.000000+09:00", + Description = "SL8MjPf2nDJncUb7prKqWXHoSFTkZLdy8B9WWqNrXVXI1wRTqwqzVsahBGWwps3iARDJTRZkOOEQFC19Wtss23YjQBhHozeYJjV02y90GWowMI3ASCsApxBJptaJJRDQ6YTYkiFEIISprQ3cmpI6bh8YrVsWGSghD", + Metadata = "{\"key\":\"value\"}", + RequestId = "996f202b-5d28-4094-835f-0b771d340d31", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -123,17 +124,17 @@ public async Task CreateTopupTransaction5() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ) { - MoneyAmount = 6761.0, - PointAmount = 1028.0, - PointExpiresAt = "2025-04-10T20:20:59.000000+09:00", - Description = "BdwXQXBx9CjvSgZke3VuPIIBeUSxLQqoj9SXP9EgDJcoagTJNb42JvVKNsj3zA7Dw0uibv6O0nFaLFwVLIZnC6rDyYuuG1XnlSIVaCTCoBzc3PolsdbrxUTbpTkQr9CA458OFUiC0xNjD1g6ausYOsWjmgSVes0LvRpIOKLgAa2m76DTKceEBbKe1QbzWrTYv", - RequestId = "686f83c8-1ae9-4867-a4c2-0116c175ee8a", + PointAmount = 6692, + PointExpiresAt = "2016-08-28T09:38:09.000000+09:00", + Description = "nnaTSFczRArCskatgTSAk3a8TcT02JvhzyAvEGRwH1gqt79bzapcrIrLur4lrAgRY4qmYCDpX8Ny7Ex4zLyYmVuuwRZjnfSOf90ILh1FnEv5pCv1ztILSktq1cNxb1w0fAXCRcSE6z5QHSLVITcWyXkWwNeThLpKI1N6RIMY7t0u9TuR54ZsbCHG", + Metadata = "{\"key\":\"value\"}", + RequestId = "2ab7fa7f-a3c4-41c9-ad1c-f49b83998eea", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -146,18 +147,43 @@ public async Task CreateTopupTransaction6() { try { Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( - "714ae247-b68c-4542-93db-005699bd57cc", - "b23cdd26-76f0-468a-8b32-ccd657594e6d", - "d7c06467-3e1d-45a0-be33-87e5f9b30da8" + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" ) { - BearPointShopId = "ccd1df59-d82b-4776-914b-b45b160fddd6", - MoneyAmount = 137.0, - PointAmount = 1422.0, - PointExpiresAt = "2020-02-19T21:22:44.000000+09:00", - Description = "VdsHD1HarFGRZ0Q28LywVGUz2sIRxtNbAYMzH", - RequestId = "0d5219fc-8b40-4265-901f-51ecc6802c77", + MoneyAmount = 4889, + PointAmount = 1707, + PointExpiresAt = "2019-03-26T12:09:25.000000+09:00", + Description = "34z4jE8W9hhkpYWEzZLn5uyvbNkf", + Metadata = "{\"key\":\"value\"}", + RequestId = "b2e2a821-102f-457d-932c-10baa2a7246b", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateTopupTransaction7() + { + try { + Request.CreateTopupTransaction request = new Request.CreateTopupTransaction( + "8e3a5553-8579-4c24-9eef-d74c712447dd", + "d55893f1-9c88-4394-85d1-1bab6d1e9afe", + "ef85eede-82cb-4468-9582-2ccddf764208" + ) { + BearPointShopId = "48447b71-0d64-4da2-877c-2ea2ffa8a760", + MoneyAmount = 975, + PointAmount = 5906, + PointExpiresAt = "2018-01-17T05:41:58.000000+09:00", + Description = "2tK1ETZVrimXQx2toEzw7Z1gM6fgx4uEjyIUvTVKqmlOa23scUcry", + Metadata = "{\"key\":\"value\"}", + RequestId = "047edf6a-2b34-402f-9647-397dde9f75ab", + }; + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransactionWithCheck.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransactionWithCheck.cs index d556601..180d4b6 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransactionWithCheck.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateTopupTransactionWithCheck.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,10 +25,10 @@ public async Task CreateTopupTransactionWithCheck0() { try { Request.CreateTopupTransactionWithCheck request = new Request.CreateTopupTransactionWithCheck( - "05bf58ad-60ad-45d2-ab9d-5a4869e6efca", - "42aa1f4c-61d0-4004-a562-822045b98659" + "b1a0825d-8e5c-42c2-be06-63d7a2828689", + "d3f7c689-bbd4-4d04-a244-f17a1758a8c1" ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateTransaction.cs index 6323a34..7ae486e 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,11 +25,11 @@ public async Task CreateTransaction0() { try { Request.CreateTransaction request = new Request.CreateTransaction( - "7c060d92-ea09-40f8-9126-4b667e847f87", - "28293aba-96e0-469c-8ff1-264e6c4457a5", - "a2162487-9e95-413b-8b89-ddc73ed91754" + "4c465e88-d17e-4002-a4e2-477788aff273", + "1c28c6a2-9817-43a9-956a-238e90da7f9f", + "962b71c0-75c6-401f-a872-db3acf509f2d" ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -41,13 +42,13 @@ public async Task CreateTransaction1() { try { Request.CreateTransaction request = new Request.CreateTransaction( - "7c060d92-ea09-40f8-9126-4b667e847f87", - "28293aba-96e0-469c-8ff1-264e6c4457a5", - "a2162487-9e95-413b-8b89-ddc73ed91754" + "4c465e88-d17e-4002-a4e2-477788aff273", + "1c28c6a2-9817-43a9-956a-238e90da7f9f", + "962b71c0-75c6-401f-a872-db3acf509f2d" ) { - Description = "hBSpAIG2GVjRLCF7S26ypTzMExe5LQXN3tfMMeaiT", + Description = "NwoEyag2SfuJiolnAr0O5BazmKqHUlvI3TLRDU2wR06BrqE4xR4G", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -60,14 +61,14 @@ public async Task CreateTransaction2() { try { Request.CreateTransaction request = new Request.CreateTransaction( - "7c060d92-ea09-40f8-9126-4b667e847f87", - "28293aba-96e0-469c-8ff1-264e6c4457a5", - "a2162487-9e95-413b-8b89-ddc73ed91754" + "4c465e88-d17e-4002-a4e2-477788aff273", + "1c28c6a2-9817-43a9-956a-238e90da7f9f", + "962b71c0-75c6-401f-a872-db3acf509f2d" ) { - PointExpiresAt = "2020-04-14T13:08:25.000000+09:00", - Description = "RlgPRLO6iu4xB9p9hHVjuFskSUixLpvflY8M", + PointExpiresAt = "2023-08-29T17:28:41.000000+09:00", + Description = "B6QEvmEtQTqfIDfhF08aWAgYKgMRg4eijui0x4AzukqXii06wz9NdLnaFp0", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -80,15 +81,15 @@ public async Task CreateTransaction3() { try { Request.CreateTransaction request = new Request.CreateTransaction( - "7c060d92-ea09-40f8-9126-4b667e847f87", - "28293aba-96e0-469c-8ff1-264e6c4457a5", - "a2162487-9e95-413b-8b89-ddc73ed91754" + "4c465e88-d17e-4002-a4e2-477788aff273", + "1c28c6a2-9817-43a9-956a-238e90da7f9f", + "962b71c0-75c6-401f-a872-db3acf509f2d" ) { - PointAmount = 3034, - PointExpiresAt = "2017-03-31T18:15:26.000000+09:00", - Description = "vlfPZ9XRs2DjUex8FZcru468uiy2IBQsK", + PointAmount = 3812, + PointExpiresAt = "2021-03-01T15:33:42.000000+09:00", + Description = "ZXWwwPUfmYGEVrOM4dkj0diMGxwkBMFBNKhTrrGkGVnz7dW1L5JRcqWGZoB7J2SLBuVTFPFKYeglUQAESlFenRvUgW2C0Pk55puUaBmR66mDvQf3SzEAz6sFhOXUyleHUBygYLLJFfbbjn", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -101,16 +102,16 @@ public async Task CreateTransaction4() { try { Request.CreateTransaction request = new Request.CreateTransaction( - "7c060d92-ea09-40f8-9126-4b667e847f87", - "28293aba-96e0-469c-8ff1-264e6c4457a5", - "a2162487-9e95-413b-8b89-ddc73ed91754" + "4c465e88-d17e-4002-a4e2-477788aff273", + "1c28c6a2-9817-43a9-956a-238e90da7f9f", + "962b71c0-75c6-401f-a872-db3acf509f2d" ) { - MoneyAmount = 7650, - PointAmount = 894, - PointExpiresAt = "2021-08-05T17:01:01.000000+09:00", - Description = "UonyUv3nTPZ701h3V5Qywi2pn04JUSx27eVHz2wOx9gOffBCzdPD5lY5ruzs73QnlHzw", + MoneyAmount = 2767, + PointAmount = 7938, + PointExpiresAt = "2019-12-07T07:28:16.000000+09:00", + Description = "1Ii4QyBabDj1sJ7k6dP6L13ja9VovumOjMgFfs83kBzSot4H9G2QRAYPymeRfFOHsPVjb9UCbPcYx5YXiYOW0oa5SUOR88F7Ubd6EIlmfbIWBjq", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateTransferTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateTransferTransaction.cs index 0bccf09..97cba1f 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestCreateTransferTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateTransferTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,12 +25,12 @@ public async Task CreateTransferTransaction0() { try { Request.CreateTransferTransaction request = new Request.CreateTransferTransaction( - "5d743523-864b-4d1f-a9b4-f5b1e4b3804d", - "555e5ecb-47f2-4f4a-9d38-1e758febb733", - "6b57a04a-4623-48f4-800b-5d07452a8a19", - 4040.0 + "72ba548b-61df-47cb-b046-ae9c95c9b5c8", + "a5024acc-06f9-4e4c-996e-2d1e5e5dd8f6", + "deb457dc-5dfa-4054-a4df-60464dea9de6", + 94.0 ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -42,14 +43,14 @@ public async Task CreateTransferTransaction1() { try { Request.CreateTransferTransaction request = new Request.CreateTransferTransaction( - "5d743523-864b-4d1f-a9b4-f5b1e4b3804d", - "555e5ecb-47f2-4f4a-9d38-1e758febb733", - "6b57a04a-4623-48f4-800b-5d07452a8a19", - 4040.0 + "72ba548b-61df-47cb-b046-ae9c95c9b5c8", + "a5024acc-06f9-4e4c-996e-2d1e5e5dd8f6", + "deb457dc-5dfa-4054-a4df-60464dea9de6", + 94.0 ) { - RequestId = "e52b4877-2ab1-4533-820a-294a04452a4c", + RequestId = "95f56e59-fb8a-4731-9bca-2b167cad46cf", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -62,15 +63,37 @@ public async Task CreateTransferTransaction2() { try { Request.CreateTransferTransaction request = new Request.CreateTransferTransaction( - "5d743523-864b-4d1f-a9b4-f5b1e4b3804d", - "555e5ecb-47f2-4f4a-9d38-1e758febb733", - "6b57a04a-4623-48f4-800b-5d07452a8a19", - 4040.0 + "72ba548b-61df-47cb-b046-ae9c95c9b5c8", + "a5024acc-06f9-4e4c-996e-2d1e5e5dd8f6", + "deb457dc-5dfa-4054-a4df-60464dea9de6", + 94.0 ) { - Description = "qURa9CDG8z1r52NxmvSo3IMgKOG9RqgqLtsxscDVj4qDxwlI", - RequestId = "a9001573-4cdb-4a6a-a359-51644f40ebc4", + Description = "DoBhEEJFs7RURiJHf6mnglgKA3t551AWYy2EKxgIvudVQK", + RequestId = "68909fcd-5a85-40a6-b3e9-4b1b2aa48499", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateTransferTransaction3() + { + try { + Request.CreateTransferTransaction request = new Request.CreateTransferTransaction( + "72ba548b-61df-47cb-b046-ae9c95c9b5c8", + "a5024acc-06f9-4e4c-996e-2d1e5e5dd8f6", + "deb457dc-5dfa-4054-a4df-60464dea9de6", + 94.0 + ) { + Metadata = "{\"key\":\"value\"}", + Description = "lyVYA6fe68jtm2G7nC3SW8MPeFKTYT7eEYLwvHQFKDImV0W8uMWRziTXMumFe", + RequestId = "a6716e61-64c5-4648-a40a-41163b9005e8", + }; + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestCreateUserAccount.cs b/src/PokepayPartnerCsharpSdk.Test/TestCreateUserAccount.cs new file mode 100644 index 0000000..5b11903 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestCreateUserAccount.cs @@ -0,0 +1,77 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestCreateUserAccount + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task CreateUserAccount0() + { + try { + Request.CreateUserAccount request = new Request.CreateUserAccount( + "1cca797a-a4ae-4807-a9ad-4bab80f00988", + "a7de9f4c-0cba-468f-80c5-ac4cef1a2e6d" + ); + Response.AccountDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateUserAccount1() + { + try { + Request.CreateUserAccount request = new Request.CreateUserAccount( + "1cca797a-a4ae-4807-a9ad-4bab80f00988", + "a7de9f4c-0cba-468f-80c5-ac4cef1a2e6d" + ) { + ExternalId = "FBMnn24Y00BddIYIaGsnHTfyj3vGhpYs6lE3PVx", + }; + Response.AccountDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task CreateUserAccount2() + { + try { + Request.CreateUserAccount request = new Request.CreateUserAccount( + "1cca797a-a4ae-4807-a9ad-4bab80f00988", + "a7de9f4c-0cba-468f-80c5-ac4cef1a2e6d" + ) { + Name = "hCRcEAVa4JmfjoJZ9ajsO39BqxPDSP5BpfA0dYcuMmHpa4aDHWm32hBFhI0DxRhz83lKq4Wp1hKlNvpHM0s7Dd9Uu6qWqC0qUtLag9adxARTcCtKjz1M2kusM3cVDMOGMtpxWNvKR6Gcp6PWCiNymBaUIu6lQIyVNDYRttS46oTXBYnbHbMuAdnXANiixumuncg7egxc7L05i8jkZ1Waa", + ExternalId = "h6AAgB9jXehhbgs", + }; + Response.AccountDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestDeleteAccount.cs b/src/PokepayPartnerCsharpSdk.Test/TestDeleteAccount.cs new file mode 100644 index 0000000..9b439e8 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestDeleteAccount.cs @@ -0,0 +1,56 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestDeleteAccount + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task DeleteAccount0() + { + try { + Request.DeleteAccount request = new Request.DeleteAccount( + "78993f7e-a95e-4e84-8ce0-7a7b0adcc451" + ); + Response.AccountDeleted response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task DeleteAccount1() + { + try { + Request.DeleteAccount request = new Request.DeleteAccount( + "78993f7e-a95e-4e84-8ce0-7a7b0adcc451" + ) { + Cashback = false, + }; + Response.AccountDeleted response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetAccount.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetAccount.cs index 93c9b46..cfe0971 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetAccount.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetAccount.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetAccount0() { try { Request.GetAccount request = new Request.GetAccount( - "7c419418-aa59-4e5c-bbdc-7d8d6bf88c31" + "ce348e12-e7ee-4579-a9c8-94dd3d6c2f3d" ); Response.AccountDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetBulkTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetBulkTransaction.cs index fc2588c..7b75103 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetBulkTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetBulkTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetBulkTransaction0() { try { Request.GetBulkTransaction request = new Request.GetBulkTransaction( - "7bb1c585-166f-40a4-a3e9-e7bad81755eb" + "cc139cd3-54a4-49fe-9bf0-d9395aadd2b0" ); Response.BulkTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetCampaign.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetCampaign.cs new file mode 100644 index 0000000..2af9a43 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetCampaign.cs @@ -0,0 +1,39 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestGetCampaign + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task GetCampaign0() + { + try { + Request.GetCampaign request = new Request.GetCampaign( + "77b3eb68-190c-4cd6-a76c-5bbb723f82cc" + ); + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetCashtray.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetCashtray.cs index 733975a..9fb1b3e 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetCashtray.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetCashtray.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetCashtray0() { try { Request.GetCashtray request = new Request.GetCashtray( - "34e67976-b4d3-4518-b73f-85965bab6090" + "7aa080f7-0ea8-4a85-a6fe-1dcdac93f7a3" ); Response.CashtrayWithResult response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetCpmToken.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetCpmToken.cs new file mode 100644 index 0000000..3183d40 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetCpmToken.cs @@ -0,0 +1,39 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestGetCpmToken + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task GetCpmToken0() + { + try { + Request.GetCpmToken request = new Request.GetCpmToken( + "VBGp3Ank6BTTvgxHzzgdLI" + ); + Response.CpmToken response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetCustomerAccounts.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetCustomerAccounts.cs index 57dc20f..8dcad7d 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetCustomerAccounts.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetCustomerAccounts.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetCustomerAccounts0() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ); Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task GetCustomerAccounts1() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - Email = "CRcEAVa4Jm@fjoJ.com", + Email = "xfr4xKRRC5@UPfd.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task GetCustomerAccounts2() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - Tel = "07915737-6839", - Email = "BqxPDSP5Bp@fA0d.com", + Tel = "09-1302581", + Email = "hDpkltxfpG@BgKz.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task GetCustomerAccounts3() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - ExternalId = "cuMmHpa4aDHWm32hBFhI0DxRhz", - Tel = "038101710", - Email = "lNvpHM0s7D@d9Uu.com", + ExternalId = "LBWMCY", + Tel = "0680922280", + Email = "nT3R8fCd81@15Vz.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -93,12 +94,12 @@ public async Task GetCustomerAccounts4() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - IsSuspended = true, - ExternalId = "qWqC0qUtLag9adxARTcCtKjz1M2kusM3c", - Tel = "04-52-8842", - Email = "pxWNvKR6Gc@p6PW.com", + Status = "pre-closed", + ExternalId = "SNwUPij0JCeKaErwIngTct5VctC8ahSG576", + Tel = "029-20-627", + Email = "hNuqsd2aOE@u5ug.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,13 +114,13 @@ public async Task GetCustomerAccounts5() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - CreatedAtTo = "2020-11-24T10:08:23.000000+09:00", IsSuspended = false, - ExternalId = "NymBaUIu6lQIyVNDYRttS46oTXBYnbHbMuAdnXANii", - Tel = "05-838-7657", - Email = "xc7L05i8jk@Z1Wa.com", + Status = "suspended", + ExternalId = "0fcKmGRUw7sMhCFW8ODbHkZSUPXBsmObvnHUjDTSSciw", + Tel = "0302-887", + Email = "IImkvl5vCA@Hh7Q.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -134,14 +135,14 @@ public async Task GetCustomerAccounts6() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - CreatedAtFrom = "2022-05-27T02:04:46.000000+09:00", - CreatedAtTo = "2016-12-11T21:40:59.000000+09:00", - IsSuspended = true, - ExternalId = "Ag", - Tel = "0003-858-273", - Email = "nyiHZ1n3qw@k3r3.com", + CreatedAtTo = "2017-11-11T00:03:31.000000+09:00", + IsSuspended = false, + Status = "active", + ExternalId = "YIcm0Sp2RluFOAxJTKKlkJp5ENq52OLTcJlns", + Tel = "0775-9145-4752", + Email = "n7Z1wrrgdx@WfKk.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -156,15 +157,15 @@ public async Task GetCustomerAccounts7() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - PerPage = 1312, - CreatedAtFrom = "2025-04-07T11:12:06.000000+09:00", - CreatedAtTo = "2022-09-25T01:02:12.000000+09:00", - IsSuspended = false, - ExternalId = "hfSXAhy6Q6NsE0G4ET", - Tel = "06827149", - Email = "XyGaN9eZjS@IQOR.com", + CreatedAtFrom = "2021-08-28T21:00:04.000000+09:00", + CreatedAtTo = "2015-11-25T18:11:51.000000+09:00", + IsSuspended = true, + Status = "pre-closed", + ExternalId = "pOR", + Tel = "00807-2523", + Email = "d4nadmeyKn@qGyq.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -179,16 +180,41 @@ public async Task GetCustomerAccounts8() { try { Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( - "7f94c950-6ed6-47a1-b8d4-2c8895d41b68" + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" ) { - Page = 7156, - PerPage = 8998, - CreatedAtFrom = "2022-02-19T23:34:45.000000+09:00", - CreatedAtTo = "2020-09-19T13:48:01.000000+09:00", - IsSuspended = true, - ExternalId = "9L", - Tel = "080-9236601", - Email = "psZzwHUgb2@qqrL.com", + PerPage = 4016, + CreatedAtFrom = "2018-03-12T00:01:50.000000+09:00", + CreatedAtTo = "2021-12-03T04:41:26.000000+09:00", + IsSuspended = false, + Status = "active", + ExternalId = "36l34SSSOxW72gqSjd8Q", + Tel = "04040475", + Email = "merReZGbvG@gvAZ.com", + }; + Response.PaginatedAccountWithUsers response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task GetCustomerAccounts9() + { + try { + Request.GetCustomerAccounts request = new Request.GetCustomerAccounts( + "5a434e63-82f5-4d3b-9357-6d0bf3dd402a" + ) { + Page = 1123, + PerPage = 890, + CreatedAtFrom = "2021-11-19T16:34:34.000000+09:00", + CreatedAtTo = "2020-01-07T05:35:58.000000+09:00", + IsSuspended = false, + Status = "pre-closed", + ExternalId = "Lea6an4P1AnQALadFsAzgfKjbtuXgZDedI", + Tel = "08-40087872", + Email = "iwZBj5AvHd@O2At.com", }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetPing.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetPing.cs index 617df51..cc493c7 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetPing.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetPing.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneyOrganizationSummaries.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneyOrganizationSummaries.cs index d1a5343..029413a 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneyOrganizationSummaries.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneyOrganizationSummaries.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetPrivateMoneyOrganizationSummaries0() { try { Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( - "e2e9b1b0-db90-40e9-92bc-e48f1bf10993" + "47bd441f-be24-42f8-9cc7-b83b54c12ce0" ); Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task GetPrivateMoneyOrganizationSummaries1() { try { Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( - "e2e9b1b0-db90-40e9-92bc-e48f1bf10993" + "47bd441f-be24-42f8-9cc7-b83b54c12ce0" ) { - Page = 8347, + Page = 2863, }; Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task GetPrivateMoneyOrganizationSummaries2() { try { Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( - "e2e9b1b0-db90-40e9-92bc-e48f1bf10993" + "47bd441f-be24-42f8-9cc7-b83b54c12ce0" ) { - PerPage = 5435, - Page = 9296, + PerPage = 4757, + Page = 94, }; Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,10 +75,10 @@ public async Task GetPrivateMoneyOrganizationSummaries3() { try { Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( - "e2e9b1b0-db90-40e9-92bc-e48f1bf10993" + "47bd441f-be24-42f8-9cc7-b83b54c12ce0" ) { - From = "2017-05-13T17:08:51.000000+09:00", - To = "2025-06-02T12:11:06.000000+09:00", + From = "2024-02-08T06:29:36.000000+09:00", + To = "2025-05-21T16:02:13.000000+09:00", }; Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -92,11 +93,11 @@ public async Task GetPrivateMoneyOrganizationSummaries4() { try { Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( - "e2e9b1b0-db90-40e9-92bc-e48f1bf10993" + "47bd441f-be24-42f8-9cc7-b83b54c12ce0" ) { - From = "2022-06-19T10:56:21.000000+09:00", - To = "2016-04-03T10:22:37.000000+09:00", - Page = 907, + From = "2025-01-24T05:20:49.000000+09:00", + To = "2025-03-21T06:13:52.000000+09:00", + Page = 7828, }; Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -111,12 +112,12 @@ public async Task GetPrivateMoneyOrganizationSummaries5() { try { Request.GetPrivateMoneyOrganizationSummaries request = new Request.GetPrivateMoneyOrganizationSummaries( - "e2e9b1b0-db90-40e9-92bc-e48f1bf10993" + "47bd441f-be24-42f8-9cc7-b83b54c12ce0" ) { - From = "2023-09-05T06:36:10.000000+09:00", - To = "2025-07-13T20:31:52.000000+09:00", - PerPage = 5661, - Page = 7042, + From = "2016-08-16T20:42:13.000000+09:00", + To = "2024-12-12T10:29:17.000000+09:00", + PerPage = 9609, + Page = 344, }; Response.PaginatedPrivateMoneyOrganizationSummaries response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneySummary.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneySummary.cs new file mode 100644 index 0000000..1bd48ae --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneySummary.cs @@ -0,0 +1,74 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestGetPrivateMoneySummary + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task GetPrivateMoneySummary0() + { + try { + Request.GetPrivateMoneySummary request = new Request.GetPrivateMoneySummary( + "207277b1-3eac-4eda-8fe8-61f8d320daad" + ); + Response.PrivateMoneySummary response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task GetPrivateMoneySummary1() + { + try { + Request.GetPrivateMoneySummary request = new Request.GetPrivateMoneySummary( + "207277b1-3eac-4eda-8fe8-61f8d320daad" + ) { + To = "2020-05-10T10:53:48.000000+09:00", + }; + Response.PrivateMoneySummary response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task GetPrivateMoneySummary2() + { + try { + Request.GetPrivateMoneySummary request = new Request.GetPrivateMoneySummary( + "207277b1-3eac-4eda-8fe8-61f8d320daad" + ) { + From = "2018-08-17T19:25:08.000000+09:00", + To = "2017-02-18T18:01:35.000000+09:00", + }; + Response.PrivateMoneySummary response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneys.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneys.cs index 7aeec9c..ea48b4f 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneys.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetPrivateMoneys.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -37,7 +38,7 @@ public async Task GetPrivateMoneys1() { try { Request.GetPrivateMoneys request = new Request.GetPrivateMoneys() { - PerPage = 1992, + PerPage = 3545, }; Response.PaginatedPrivateMoneys response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -52,8 +53,8 @@ public async Task GetPrivateMoneys2() { try { Request.GetPrivateMoneys request = new Request.GetPrivateMoneys() { - Page = 7439, - PerPage = 3155, + Page = 2545, + PerPage = 6265, }; Response.PaginatedPrivateMoneys response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -68,9 +69,9 @@ public async Task GetPrivateMoneys3() { try { Request.GetPrivateMoneys request = new Request.GetPrivateMoneys() { - OrganizationCode = "-pxt-zfw-hZk9-i52--OGq1-K-8o", - Page = 7075, - PerPage = 9099, + OrganizationCode = "-2V-c00-lsJ--485-YX", + Page = 3242, + PerPage = 5035, }; Response.PaginatedPrivateMoneys response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetShop.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetShop.cs index fbadea1..66b72b7 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetShop.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetShop.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetShop0() { try { Request.GetShop request = new Request.GetShop( - "6eb30c0f-4395-4d20-960e-651246ed2ccc" + "1dba2796-4f52-483e-9487-f5b6546bde93" ); Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetShopAccounts.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetShopAccounts.cs index 28c7acf..2f5f01d 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetShopAccounts.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetShopAccounts.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task GetShopAccounts0() { try { Request.GetShopAccounts request = new Request.GetShopAccounts( - "cefac7bd-7c9f-4b80-8497-6f58374d0405" + "122f7c99-ba73-409e-bcaf-ca2e6fa9d12e" ); Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task GetShopAccounts1() { try { Request.GetShopAccounts request = new Request.GetShopAccounts( - "cefac7bd-7c9f-4b80-8497-6f58374d0405" + "122f7c99-ba73-409e-bcaf-ca2e6fa9d12e" ) { - IsSuspended = false, + IsSuspended = true, }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task GetShopAccounts2() { try { Request.GetShopAccounts request = new Request.GetShopAccounts( - "cefac7bd-7c9f-4b80-8497-6f58374d0405" + "122f7c99-ba73-409e-bcaf-ca2e6fa9d12e" ) { - CreatedAtTo = "2022-04-20T13:19:07.000000+09:00", - IsSuspended = false, + CreatedAtTo = "2022-08-14T03:51:44.000000+09:00", + IsSuspended = true, }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,10 +75,10 @@ public async Task GetShopAccounts3() { try { Request.GetShopAccounts request = new Request.GetShopAccounts( - "cefac7bd-7c9f-4b80-8497-6f58374d0405" + "122f7c99-ba73-409e-bcaf-ca2e6fa9d12e" ) { - CreatedAtFrom = "2023-06-22T06:11:54.000000+09:00", - CreatedAtTo = "2020-12-13T09:02:00.000000+09:00", + CreatedAtFrom = "2019-11-10T12:31:26.000000+09:00", + CreatedAtTo = "2019-03-02T06:47:02.000000+09:00", IsSuspended = false, }; Response.PaginatedAccountWithUsers response = await request.Send(client); @@ -93,12 +94,12 @@ public async Task GetShopAccounts4() { try { Request.GetShopAccounts request = new Request.GetShopAccounts( - "cefac7bd-7c9f-4b80-8497-6f58374d0405" + "122f7c99-ba73-409e-bcaf-ca2e6fa9d12e" ) { - PerPage = 2964, - CreatedAtFrom = "2018-02-16T12:42:28.000000+09:00", - CreatedAtTo = "2020-07-10T19:56:26.000000+09:00", - IsSuspended = true, + PerPage = 5016, + CreatedAtFrom = "2021-02-21T01:26:31.000000+09:00", + CreatedAtTo = "2021-11-11T09:43:58.000000+09:00", + IsSuspended = false, }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,13 +114,13 @@ public async Task GetShopAccounts5() { try { Request.GetShopAccounts request = new Request.GetShopAccounts( - "cefac7bd-7c9f-4b80-8497-6f58374d0405" + "122f7c99-ba73-409e-bcaf-ca2e6fa9d12e" ) { - Page = 743, - PerPage = 5060, - CreatedAtFrom = "2022-08-28T18:33:16.000000+09:00", - CreatedAtTo = "2019-06-07T10:01:10.000000+09:00", - IsSuspended = false, + Page = 878, + PerPage = 4128, + CreatedAtFrom = "2016-03-21T11:12:51.000000+09:00", + CreatedAtTo = "2023-10-10T08:53:50.000000+09:00", + IsSuspended = true, }; Response.PaginatedAccountWithUsers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetTransaction.cs index 32723ad..522b7a7 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,9 +25,9 @@ public async Task GetTransaction0() { try { Request.GetTransaction request = new Request.GetTransaction( - "bed23e28-88f1-475d-ba4b-d807e81099a5" + "20b8f657-fa62-4a08-80b0-76286d6beb38" ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestGetUser.cs b/src/PokepayPartnerCsharpSdk.Test/TestGetUser.cs index e7a4b71..a227d42 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestGetUser.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestGetUser.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListAccountBalances.cs b/src/PokepayPartnerCsharpSdk.Test/TestListAccountBalances.cs index 9f99f5b..de66aa6 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListAccountBalances.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListAccountBalances.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task ListAccountBalances0() { try { Request.ListAccountBalances request = new Request.ListAccountBalances( - "cc450cba-668f-4380-854c-2e6dae6d9426" + "124a3fe8-1e88-4803-9195-15bbd1722f1a" ); Response.PaginatedAccountBalance response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,7 +40,7 @@ public async Task ListAccountBalances1() { try { Request.ListAccountBalances request = new Request.ListAccountBalances( - "cc450cba-668f-4380-854c-2e6dae6d9426" + "124a3fe8-1e88-4803-9195-15bbd1722f1a" ) { Direction = "desc", }; @@ -56,9 +57,9 @@ public async Task ListAccountBalances2() { try { Request.ListAccountBalances request = new Request.ListAccountBalances( - "cc450cba-668f-4380-854c-2e6dae6d9426" + "124a3fe8-1e88-4803-9195-15bbd1722f1a" ) { - ExpiresAtTo = "2023-12-04T19:51:42.000000+09:00", + ExpiresAtTo = "2021-05-19T16:07:19.000000+09:00", Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); @@ -74,11 +75,11 @@ public async Task ListAccountBalances3() { try { Request.ListAccountBalances request = new Request.ListAccountBalances( - "cc450cba-668f-4380-854c-2e6dae6d9426" + "124a3fe8-1e88-4803-9195-15bbd1722f1a" ) { - ExpiresAtFrom = "2023-01-15T03:20:22.000000+09:00", - ExpiresAtTo = "2016-07-18T17:09:40.000000+09:00", - Direction = "asc", + ExpiresAtFrom = "2018-05-08T14:00:21.000000+09:00", + ExpiresAtTo = "2019-08-29T14:43:17.000000+09:00", + Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -93,12 +94,12 @@ public async Task ListAccountBalances4() { try { Request.ListAccountBalances request = new Request.ListAccountBalances( - "cc450cba-668f-4380-854c-2e6dae6d9426" + "124a3fe8-1e88-4803-9195-15bbd1722f1a" ) { - PerPage = 2394, - ExpiresAtFrom = "2025-01-10T04:46:02.000000+09:00", - ExpiresAtTo = "2024-05-11T03:04:24.000000+09:00", - Direction = "asc", + PerPage = 9044, + ExpiresAtFrom = "2015-11-13T07:54:24.000000+09:00", + ExpiresAtTo = "2023-12-17T09:40:00.000000+09:00", + Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,12 +114,12 @@ public async Task ListAccountBalances5() { try { Request.ListAccountBalances request = new Request.ListAccountBalances( - "cc450cba-668f-4380-854c-2e6dae6d9426" + "124a3fe8-1e88-4803-9195-15bbd1722f1a" ) { - Page = 5477, - PerPage = 8394, - ExpiresAtFrom = "2022-03-09T11:53:53.000000+09:00", - ExpiresAtTo = "2019-09-12T11:19:03.000000+09:00", + Page = 5673, + PerPage = 5586, + ExpiresAtFrom = "2022-06-09T18:09:43.000000+09:00", + ExpiresAtTo = "2017-11-03T08:44:37.000000+09:00", Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListAccountExpiredBalances.cs b/src/PokepayPartnerCsharpSdk.Test/TestListAccountExpiredBalances.cs index 010867d..a5a9941 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListAccountExpiredBalances.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListAccountExpiredBalances.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task ListAccountExpiredBalances0() { try { Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( - "c3851eee-c081-4e48-9428-8ce6203ac303" + "1395c3b0-3227-4847-b485-d25fcda949fd" ); Response.PaginatedAccountBalance response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task ListAccountExpiredBalances1() { try { Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( - "c3851eee-c081-4e48-9428-8ce6203ac303" + "1395c3b0-3227-4847-b485-d25fcda949fd" ) { - Direction = "desc", + Direction = "asc", }; Response.PaginatedAccountBalance response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task ListAccountExpiredBalances2() { try { Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( - "c3851eee-c081-4e48-9428-8ce6203ac303" + "1395c3b0-3227-4847-b485-d25fcda949fd" ) { - ExpiresAtTo = "2023-10-14T15:41:08.000000+09:00", - Direction = "desc", + ExpiresAtTo = "2016-12-05T14:11:55.000000+09:00", + Direction = "asc", }; Response.PaginatedAccountBalance response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,10 +75,10 @@ public async Task ListAccountExpiredBalances3() { try { Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( - "c3851eee-c081-4e48-9428-8ce6203ac303" + "1395c3b0-3227-4847-b485-d25fcda949fd" ) { - ExpiresAtFrom = "2016-02-07T23:51:43.000000+09:00", - ExpiresAtTo = "2023-06-26T07:13:08.000000+09:00", + ExpiresAtFrom = "2024-05-08T18:48:53.000000+09:00", + ExpiresAtTo = "2025-01-11T13:02:08.000000+09:00", Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); @@ -93,11 +94,11 @@ public async Task ListAccountExpiredBalances4() { try { Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( - "c3851eee-c081-4e48-9428-8ce6203ac303" + "1395c3b0-3227-4847-b485-d25fcda949fd" ) { - PerPage = 1280, - ExpiresAtFrom = "2017-09-19T20:56:50.000000+09:00", - ExpiresAtTo = "2021-05-01T18:07:44.000000+09:00", + PerPage = 6193, + ExpiresAtFrom = "2019-01-16T17:00:54.000000+09:00", + ExpiresAtTo = "2022-10-20T15:33:42.000000+09:00", Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); @@ -113,12 +114,12 @@ public async Task ListAccountExpiredBalances5() { try { Request.ListAccountExpiredBalances request = new Request.ListAccountExpiredBalances( - "c3851eee-c081-4e48-9428-8ce6203ac303" + "1395c3b0-3227-4847-b485-d25fcda949fd" ) { - Page = 7954, - PerPage = 183, - ExpiresAtFrom = "2017-07-15T07:24:12.000000+09:00", - ExpiresAtTo = "2018-02-11T05:24:08.000000+09:00", + Page = 3229, + PerPage = 3545, + ExpiresAtFrom = "2019-04-01T22:27:42.000000+09:00", + ExpiresAtTo = "2018-06-03T18:12:31.000000+09:00", Direction = "desc", }; Response.PaginatedAccountBalance response = await request.Send(client); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListBills.cs b/src/PokepayPartnerCsharpSdk.Test/TestListBills.cs index 5eb9f6c..bf089ad 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListBills.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListBills.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -52,8 +53,8 @@ public async Task ListBills2() { try { Request.ListBills request = new Request.ListBills() { - UpperLimitAmount = 6550, - IsDisabled = true, + UpperLimitAmount = 7359, + IsDisabled = false, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -68,9 +69,9 @@ public async Task ListBills3() { try { Request.ListBills request = new Request.ListBills() { - LowerLimitAmount = 5371, - UpperLimitAmount = 1502, - IsDisabled = false, + LowerLimitAmount = 4602, + UpperLimitAmount = 4086, + IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -85,9 +86,9 @@ public async Task ListBills4() { try { Request.ListBills request = new Request.ListBills() { - ShopId = "0744757a-0466-40a2-9fd3-6d2dc831404e", - LowerLimitAmount = 503, - UpperLimitAmount = 2063, + ShopId = "2e5af513-ed9a-4083-b833-b54d02d47b19", + LowerLimitAmount = 8071, + UpperLimitAmount = 9515, IsDisabled = false, }; Response.PaginatedBills response = await request.Send(client); @@ -103,11 +104,11 @@ public async Task ListBills5() { try { Request.ListBills request = new Request.ListBills() { - ShopName = "UPij0JCeKaErwIngTct5VctC8ahSG576Yk267hNuqsd2aOEu5ugI0fcKmGRUw7sMhCFW8ODbHkZSUPXBsmObvnHUjDTSSciw3PX7IImkvl5vCAHh7QD95u0YIcm0Sp2RluFOAxJTKKlkJp5ENq52OLTcJlnsa7zuy", - ShopId = "621c603a-c6b1-4df4-9d75-62f3e2935501", - LowerLimitAmount = 1015, - UpperLimitAmount = 5477, - IsDisabled = true, + ShopName = "oePO7gkONNAjBCYm4KWEpCDEdkn0OKxjITuRCVadPy2BbYSAUfNgtCT3aJmzxxuQUVBryDZD3LHlYNS3c0MUvvhZyFdpqg4zFLwpBAFUZ73GCZjYfwcSTcjOL0y0KRT0zFenF09DVyQoaELlrJk6MRPKi62IzWH9", + ShopId = "0c7a21e5-557f-4a6d-955b-517b3dd30ee8", + LowerLimitAmount = 209, + UpperLimitAmount = 816, + IsDisabled = false, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -122,12 +123,12 @@ public async Task ListBills6() { try { Request.ListBills request = new Request.ListBills() { - CreatedTo = "2024-02-09T16:55:33.000000+09:00", - ShopName = "Z1wrrgdxWfKkMLwrBpORQ9LHlnKRmCd4nadmeyKnqGyqpn3W7S36l34SSSOxW72gqSjd8QPzbjt0rt7UmerReZGbvGgvAZbyLJ1Lea6an4P1AnQALadFsAzgfKjbtuXgZDedIJqTHGgnOhGiwZBj5AvHdO2AtfcLabY2vDzXzQx3sP8V6IT9VFC5", - ShopId = "6a438f62-b511-446f-b093-638a0541d53f", - LowerLimitAmount = 344, - UpperLimitAmount = 4198, - IsDisabled = false, + CreatedTo = "2016-09-22T06:07:05.000000+09:00", + ShopName = "qvNNBrhyRg9xxzNXJhnMZrEqyRqPCGzbSmOoYCMUQNjvF4AYLzd022rwQVNfYYCfZZWpAcyBWwWi1DgvTt4hTTZowFPycMflfcbIeOIKes05558vbabHcGuqU0Zpo5LBba7yo5q8iSiTBSZQPeDSY9S36TscHpgaN0j8ZeP1HDPDTHzzRIdWxHjKy82N74miDUcO", + ShopId = "948773a6-ae75-4949-97d6-b2718a61833c", + LowerLimitAmount = 3549, + UpperLimitAmount = 2078, + IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -142,13 +143,13 @@ public async Task ListBills7() { try { Request.ListBills request = new Request.ListBills() { - CreatedFrom = "2017-10-06T00:37:12.000000+09:00", - CreatedTo = "2022-10-15T14:09:50.000000+09:00", - ShopName = "8jPQ0hMJ4nPgNJOUuVI3xkUSOX0vTgyFK1FOp7pl9MWii2exAarzlUllrgsQZQAnUYeKIbZQuPYAKNLvTyMcIYlLoYSz5jRHNPv9LO3MtPyt1wTnktL8AYkBvD7caRgncONv8Kje2pUTWzADND", - ShopId = "195e4ee5-eb1d-4906-b8b7-82efe5592669", - LowerLimitAmount = 193, - UpperLimitAmount = 7876, - IsDisabled = false, + CreatedFrom = "2017-04-21T06:11:13.000000+09:00", + CreatedTo = "2022-12-18T16:25:01.000000+09:00", + ShopName = "93kljq1Q8TjukgNdosrcsbqXkWqVhxkWkSbCcQV2KWKaXCJgJ38wW32AKvILX828FihWZQyqSbK0FMXzQI3K0upT8cYYAuEa7VHyo1Pr6ZXG8JSWzel5X6ggilnbIikjMsDtvgyHs8kXaVldBOvstCOu5vNtx3bBib1BS1I", + ShopId = "6272f9c9-0408-48a5-9d98-2915c1561fc7", + LowerLimitAmount = 5847, + UpperLimitAmount = 708, + IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -163,14 +164,14 @@ public async Task ListBills8() { try { Request.ListBills request = new Request.ListBills() { - Description = "B6ZsUUsk6umIdkjysmBoCy1Ud1e5PrxfXmPZX1V", - CreatedFrom = "2025-06-28T06:22:12.000000+09:00", - CreatedTo = "2022-10-09T02:35:10.000000+09:00", - ShopName = "ebv0ckwSJ4e9e0pY47yGoAwg28Msl4sq96mAewFZHEg2RF0uEHwK5Jbwu9JRSn5a7ymUxn4mfvD7ycun86BZW4IWD5GZy4J15w0ovSrq2HjQnZoVWhOdLDSpe9mEjTApY38vZyrfHaX2ePxiTIXhf26BicGgC0Q3onqPmyIzFPAF7SEHME8DlS2m5Kv5IbgTWsj7MinGr0IGEeLzU5ms0HjwVmUqLVvuFmzvx3MioePO7gkONN", - ShopId = "4faa4393-bfc1-4501-bb6a-b042c64b79ab", - LowerLimitAmount = 1219, - UpperLimitAmount = 729, - IsDisabled = true, + Description = "mpTYqNNFPcbcfJ8JMK49acleVRspcldtQ5tmURvImdniels4ZrQj5", + CreatedFrom = "2022-08-09T13:54:34.000000+09:00", + CreatedTo = "2017-05-06T05:18:03.000000+09:00", + ShopName = "fJFTwwcn9WP3m8VyuReCXx5WTYs7Yv5KDLwBcz7zjgazophuiC1VR8XiXW8JGdOuAk94khcXRAwlFr4tlYuwMI02c6YHU8uGe8qGNvTmA6H2tH06f3cpkGDNNhHR4jcwCrCw", + ShopId = "ae4a9f70-fa3e-4f8f-96ec-d3709e06d89b", + LowerLimitAmount = 8058, + UpperLimitAmount = 2251, + IsDisabled = false, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -185,14 +186,14 @@ public async Task ListBills9() { try { Request.ListBills request = new Request.ListBills() { - OrganizationCode = "AsqS2Z-V79-dtNkY7", - Description = "xuQUV", - CreatedFrom = "2023-06-24T23:35:38.000000+09:00", - CreatedTo = "2022-08-08T06:45:21.000000+09:00", - ShopName = "ZD3LHlYNS3c0MUvvhZyFdpqg4zFLwpBAFUZ73GCZjYfwcSTcjOL0y0KRT0zFenF09DVyQoaELlrJk6MRPKi62IzWH9emhQ0CqvNNBrhyRg9xxzNXJhnMZrEqyRqPCGzbSmOoYCMUQNjvF4AYLzd022rwQVNfYYCfZZWpAcyBWwWi1DgvTt4hTTZowFPycMflfcbIe", - ShopId = "515d81cf-56c9-4e2d-8b3e-fcaf1c1fe59d", - LowerLimitAmount = 4965, - UpperLimitAmount = 6298, + OrganizationCode = "404Hb--O42M", + Description = "uvrmGGKjRYVWTh4n3trK0bvzHyQJ1u0mKrSXl5b4zkBhHXIiOwN14umNbs9HzTMzg2AFGgoFwChMKyFjnp6NWuVTvukHEJJxjvwAaSkrlPscgFZA7kgmnQGh0g7xEy0gjIfqsy3qqeO2uL3gmJXocI00jDfhi", + CreatedFrom = "2023-06-15T17:06:17.000000+09:00", + CreatedTo = "2023-05-29T14:48:38.000000+09:00", + ShopName = "YKzlD45lOs5FqPThDPFGAn6g717B9KAWVHYRkMJaQT0YWfQtgxVhq9RVZQG6j5A2pjVon4uuDqic8AnsoXtmv8LerXQe8LjF8Q6qvpD5ZbBwXFvQ1skGDixXFJczCMVyjlRecAjobCopZKVFLb9UiV0XEmtc9iB2syyuELfawMoOZtkTktpas3rTKhS7CSUreJUtTC5W6xtdNcZmGzg6LOAwdB03Wi69g5bppku3R9lJ", + ShopId = "a4e25bd6-be64-40c4-a1be-1ed5eaa685a2", + LowerLimitAmount = 9117, + UpperLimitAmount = 8053, IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); @@ -208,16 +209,16 @@ public async Task ListBills10() { try { Request.ListBills request = new Request.ListBills() { - PrivateMoneyId = "864ea212-382c-493b-9df3-443f4fd60db0", - OrganizationCode = "Q0--Vm51xP51j-Uc-1fe-3Z-e---", - Description = "TscHpgaN0j8ZeP1HDPDTHzzRIdWxHjKy82N74miDUcOuIVqRIEU93kljq1Q8TjukgNdosrcsbqXkWqVhxkWkSbCcQV2KWKaXCJgJ38wW32AKvILX828FihWZQyqSbK0FMXzQI3K0upT8cYYAuEa7VHyo1Pr6ZXG8JSWzel5X6ggilnbIikjMsDt", - CreatedFrom = "2019-04-11T19:02:55.000000+09:00", - CreatedTo = "2016-03-28T17:19:29.000000+09:00", - ShopName = "Hs8kXaVldBOvstCOu5vNtx3bBib1BS1IIGWD4mpTYqNNFPcbcfJ8JMK49acle", - ShopId = "54afd3d6-a852-4a73-bc70-69e31ba6b2ec", - LowerLimitAmount = 868, - UpperLimitAmount = 2036, - IsDisabled = false, + PrivateMoneyId = "716cc767-18cb-4049-b7f5-b82c3175b4f8", + OrganizationCode = "-ysR--VE0l4w7-6-Wyr-iTkm9kUT0GB", + Description = "Z8O9N2SLzG35Urh2rbZx2aArvrKFEW0caD1nqOzKQjZCyx1E", + CreatedFrom = "2021-09-15T09:27:20.000000+09:00", + CreatedTo = "2019-06-27T17:44:43.000000+09:00", + ShopName = "AmGgvgI7YgVKC9RfQiSpTWZrd0hVSBtTuiSKN3fmfJoVUvvyWz4acD4YN59s59xIWGujcTxFFrrXyLyMOsteVH8YLvoUoraY", + ShopId = "28ed2a08-e8f9-4ed6-9ffe-24291ea30b55", + LowerLimitAmount = 6511, + UpperLimitAmount = 4296, + IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -232,17 +233,17 @@ public async Task ListBills11() { try { Request.ListBills request = new Request.ListBills() { - BillId = "5tmURvImdn", - PrivateMoneyId = "ed6fdaa7-91e9-45e5-9b29-8dec29b3be0c", - OrganizationCode = "DoRXh-Y-9SWD-l-fv-u", - Description = "Ys7Yv5K", - CreatedFrom = "2016-09-06T09:57:24.000000+09:00", - CreatedTo = "2023-02-14T22:10:18.000000+09:00", - ShopName = "cz7zjgazoph", - ShopId = "e79838f5-c921-4023-9669-1143c81ef931", - LowerLimitAmount = 9302, - UpperLimitAmount = 3548, - IsDisabled = true, + BillId = "Sd144X", + PrivateMoneyId = "e78721b7-4691-46da-8571-73a2a1c7c8b8", + OrganizationCode = "31-Uf7-6-z-zknx92q-1x", + Description = "sz1ogogHitDMic7XGDhIwoiIw8buBfBCDG7j4DoWkp", + CreatedFrom = "2024-05-07T23:27:04.000000+09:00", + CreatedTo = "2025-03-31T00:14:26.000000+09:00", + ShopName = "bqBi9TROGFtlR9rLj2Y1ER9gKdUSrcKHlFd3Ur1MCMIUROIYftW7QMsIbzCAj1GsSvfXjxUW5P", + ShopId = "42dc7102-d24d-40e4-96c4-a4f5a3dbec42", + LowerLimitAmount = 2291, + UpperLimitAmount = 3021, + IsDisabled = false, }; Response.PaginatedBills response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -257,17 +258,17 @@ public async Task ListBills12() { try { Request.ListBills request = new Request.ListBills() { - PerPage = 447, - BillId = "XiXW8JGdO", - PrivateMoneyId = "5050d80d-c7ba-4f99-ad8b-b975c78d25bf", - OrganizationCode = "z", - Description = "uwMI02c6YHU8uGe8qGNvTmA", - CreatedFrom = "2021-03-11T17:24:05.000000+09:00", - CreatedTo = "2024-02-26T23:31:28.000000+09:00", - ShopName = "H06f3cpkGDNNhHR4jcwCrCwplpzKOK41muEKIO2q9f6dQ5BvDAnz25uvrmGGKjRYVWTh4n3trK0bvzHyQJ1u0mKrSXl5b4zkBhHXIiOwN14umNbs9HzTMzg2AFGgoFwChMKyFjnp6NWuVTvukHEJJxjvwAaSkrlPscgFZA7kgmnQGh0g7xEy0gjIfqsy3qqeO2uL3gmJXocI00jDfhi9nkYKzlD45lOs5FqPThDPFGAn6g717B9KA", - ShopId = "e1400ce0-47d7-451c-9618-89c8bbd88a9a", - LowerLimitAmount = 2172, - UpperLimitAmount = 8069, + PerPage = 7335, + BillId = "4", + PrivateMoneyId = "676cfe50-fbd4-45e6-9ddd-57bbebbd2038", + OrganizationCode = "-1J46-L17Hqg--PKp90", + Description = "eqlmfnAfu7erS3gFr3FTdQ8rwckpkfwdxwxZ95sfTG55oAI4VCG4sTwcYeFwcP7ZmLygXYRtjxN2aIco6xNkWo0aYr1y1KHCmQGL0IM3EaCDd87kJG01a7", + CreatedFrom = "2019-03-10T19:56:29.000000+09:00", + CreatedTo = "2024-05-06T13:46:18.000000+09:00", + ShopName = "GOWj7LV4", + ShopId = "4755ab3c-64f6-4635-bdaa-a7a57e89da79", + LowerLimitAmount = 6767, + UpperLimitAmount = 9588, IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); @@ -283,18 +284,18 @@ public async Task ListBills13() { try { Request.ListBills request = new Request.ListBills() { - Page = 5228, - PerPage = 6990, - BillId = "aQT0YWfQtg", - PrivateMoneyId = "aa0d8a40-f689-4fdb-b8d6-736898ef5371", - OrganizationCode = "-4V-k1D8HboK--w-uW", - Description = "LerXQe8LjF8Q6qvpD5ZbBwXFvQ1skGDixXFJczCMVyjlRecAjobCopZKV", - CreatedFrom = "2024-12-05T21:24:47.000000+09:00", - CreatedTo = "2021-12-15T16:10:53.000000+09:00", - ShopName = "9UiV0XEmtc9iB2syyuELfawMoOZtkTktpas3rTKhS7CSUreJUtTC5W6xtdNcZmGzg6LOAwdB03Wi69g5bppku3R9lJVdDaUu8gKI7uxlsX8tJTVN1o4Avhi0fX5dozKzovfXQ3PHUhjHLVEtSIaxZ8O9N2SLzG35Urh2rbZx2aArvrKFEW0caD1nqOz", - ShopId = "ef491acb-060a-4810-910f-e7adbe43b402", - LowerLimitAmount = 2666, - UpperLimitAmount = 8542, + Page = 9150, + PerPage = 5993, + BillId = "j2v", + PrivateMoneyId = "2a50f1eb-066a-4d69-ab5c-a493546c70a6", + OrganizationCode = "81m-q--4s8Omc8L08V3--9", + Description = "4Wo0L4evFZLjpsodOQD43fZ5T5bk20dIuBp2e25agSXyEGickpeze5Yn7vyzhltNB5edjt157B8n6abEccTMUOFUG9Fme9wlEEj2gZC8ckmFOzWRdKb11QTIHM0x5oJQ4O2Nwel4rHJTDGFvqXggC9Tcy7ogKmUw0VnsFyzfyt6Bg95FB1a7IFTBkW9tPubyeqITUoc5", + CreatedFrom = "2023-07-02T11:25:11.000000+09:00", + CreatedTo = "2015-11-08T17:04:41.000000+09:00", + ShopName = "HWI6lY3NxA2Qq6LVyn2dOGJj5BoyL1MgjctfisLuYo4aorOwFrhmbs26EDkzDLnAr7NHvMDZLOk3Kn6N9IKA2DQ0UDl0RkGXqQRpkGArTGUPugetKJLdESdgB4DMlPhuAgx6J23S5a4KJH2dJnXO", + ShopId = "6abb6696-1d0c-4d3e-a5c1-3ca99e0575ac", + LowerLimitAmount = 8697, + UpperLimitAmount = 5048, IsDisabled = true, }; Response.PaginatedBills response = await request.Send(client); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListCampaigns.cs b/src/PokepayPartnerCsharpSdk.Test/TestListCampaigns.cs new file mode 100644 index 0000000..39cdef5 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestListCampaigns.cs @@ -0,0 +1,93 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestListCampaigns + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task ListCampaigns0() + { + try { + Request.ListCampaigns request = new Request.ListCampaigns( + "fb229154-3b05-4c43-9ff6-fd8c6b60cb12" + ); + Response.PaginatedCampaigns response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListCampaigns1() + { + try { + Request.ListCampaigns request = new Request.ListCampaigns( + "fb229154-3b05-4c43-9ff6-fd8c6b60cb12" + ) { + PerPage = 690, + }; + Response.PaginatedCampaigns response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListCampaigns2() + { + try { + Request.ListCampaigns request = new Request.ListCampaigns( + "fb229154-3b05-4c43-9ff6-fd8c6b60cb12" + ) { + Page = 5886, + PerPage = 9959, + }; + Response.PaginatedCampaigns response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListCampaigns3() + { + try { + Request.ListCampaigns request = new Request.ListCampaigns( + "fb229154-3b05-4c43-9ff6-fd8c6b60cb12" + ) { + IsOngoing = true, + Page = 3359, + PerPage = 4634, + }; + Response.PaginatedCampaigns response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListCustomerTransactions.cs b/src/PokepayPartnerCsharpSdk.Test/TestListCustomerTransactions.cs index 5de75ae..6741aed 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListCustomerTransactions.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListCustomerTransactions.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task ListCustomerTransactions0() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ); Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task ListCustomerTransactions1() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - PerPage = 3769, + PerPage = 6306, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task ListCustomerTransactions2() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - Page = 5727, - PerPage = 546, + Page = 568, + PerPage = 7044, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task ListCustomerTransactions3() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - To = "2022-03-28T00:00:35.000000+09:00", - Page = 5419, - PerPage = 1275, + To = "2017-03-04T12:47:41.000000+09:00", + Page = 6492, + PerPage = 4773, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -93,12 +94,12 @@ public async Task ListCustomerTransactions4() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - From = "2022-10-10T10:15:09.000000+09:00", - To = "2017-11-18T23:55:30.000000+09:00", - Page = 3942, - PerPage = 4322, + From = "2023-07-12T05:20:36.000000+09:00", + To = "2022-11-02T06:39:42.000000+09:00", + Page = 9959, + PerPage = 9931, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,13 +114,13 @@ public async Task ListCustomerTransactions5() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { IsModified = true, - From = "2019-03-09T19:38:07.000000+09:00", - To = "2024-10-26T06:14:47.000000+09:00", - Page = 6676, - PerPage = 2346, + From = "2018-03-07T19:23:07.000000+09:00", + To = "2018-02-02T02:34:09.000000+09:00", + Page = 403, + PerPage = 9309, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -134,14 +135,14 @@ public async Task ListCustomerTransactions6() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - Type = "0rU", - IsModified = true, - From = "2024-05-30T20:29:53.000000+09:00", - To = "2017-09-30T20:15:42.000000+09:00", - Page = 1622, - PerPage = 5756, + Type = "topup", + IsModified = false, + From = "2024-02-03T09:38:39.000000+09:00", + To = "2025-07-21T11:03:54.000000+09:00", + Page = 9365, + PerPage = 9128, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -156,15 +157,15 @@ public async Task ListCustomerTransactions7() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - ReceiverCustomerId = "d783a8bb-7d3a-4ffe-a0d4-81e00c4ae0e3", - Type = "nGDBsZu", - IsModified = true, - From = "2018-02-21T16:33:11.000000+09:00", - To = "2022-12-23T09:50:02.000000+09:00", - Page = 3648, - PerPage = 8655, + ReceiverCustomerId = "8d502c53-31cb-4f93-8ba8-a1fcf5d66752", + Type = "cashback", + IsModified = false, + From = "2020-12-12T00:34:00.000000+09:00", + To = "2021-02-25T20:52:44.000000+09:00", + Page = 3341, + PerPage = 3336, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -179,16 +180,16 @@ public async Task ListCustomerTransactions8() { try { Request.ListCustomerTransactions request = new Request.ListCustomerTransactions( - "4ccce7aa-20a7-4f51-ab80-5881d8c043e8" + "a804d396-c0bd-4bc8-83fb-80edddd57010" ) { - SenderCustomerId = "ed0e598d-4ef6-4f00-a9e6-459dd79243d3", - ReceiverCustomerId = "ee2103b9-4341-47bc-aef5-d5e6d749657b", - Type = "ij", - IsModified = false, - From = "2021-07-08T16:22:22.000000+09:00", - To = "2024-12-16T19:43:12.000000+09:00", - Page = 6877, - PerPage = 1042, + SenderCustomerId = "19fc2c78-ddc0-46b8-8963-2b6986fd9ae0", + ReceiverCustomerId = "841e4321-a7ce-4d72-8bf7-2b654d5e9d15", + Type = "exchange", + IsModified = true, + From = "2020-03-20T03:48:42.000000+09:00", + To = "2019-05-25T02:41:42.000000+09:00", + Page = 784, + PerPage = 941, }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListShops.cs b/src/PokepayPartnerCsharpSdk.Test/TestListShops.cs index 1c7488e..307f9e9 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListShops.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListShops.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -37,7 +38,7 @@ public async Task ListShops1() { try { Request.ListShops request = new Request.ListShops() { - PerPage = 4213, + PerPage = 4558, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -52,8 +53,8 @@ public async Task ListShops2() { try { Request.ListShops request = new Request.ListShops() { - Page = 6561, - PerPage = 1320, + Page = 3784, + PerPage = 9980, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -68,9 +69,9 @@ public async Task ListShops3() { try { Request.ListShops request = new Request.ListShops() { - ExternalId = "2", - Page = 1639, - PerPage = 7999, + ExternalId = "98zC6otpSw3LnpbrPkZnNjPWO5", + Page = 2230, + PerPage = 1954, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -85,10 +86,10 @@ public async Task ListShops4() { try { Request.ListShops request = new Request.ListShops() { - Email = "HYeeJWiJLn@1TOW.com", - ExternalId = "VNqKCYgaN", - Page = 4407, - PerPage = 1671, + Email = "DSfY3LgW5M@2IvR.com", + ExternalId = "2CgIBy3eLTys12HHDFFeqLoUtYmfM0", + Page = 4320, + PerPage = 8025, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -103,11 +104,11 @@ public async Task ListShops5() { try { Request.ListShops request = new Request.ListShops() { - Tel = "077-4582173", - Email = "7yVjYZzSkj@ksoj.com", - ExternalId = "4Pn", - Page = 2965, - PerPage = 6871, + Tel = "09-101552", + Email = "Y3jVYhbh4R@W4Sj.com", + ExternalId = "cPHu2gIp7Hl", + Page = 1172, + PerPage = 5011, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -122,12 +123,12 @@ public async Task ListShops6() { try { Request.ListShops request = new Request.ListShops() { - Address = "sBfF1BkHf1A87wLQ9bOIRS2WYI5ck8HRSP5FHw4UX4tGWi4N1WpwhPzDe8V1DYdcKn6nAl4cEX71br7jv7EDkwXN76HyKk1SGbd2fzw9nBiKXYeHN7C4dOhcXyEVzhZku2OJwUM0ktk1yse4CdNhZgpKbkXWC5tLFNUhqVPCyC44juCu9OYkti8Qhc", - Tel = "05-320-471", - Email = "potaJBLyz8@KN17.com", - ExternalId = "xPU1GvU5oJnH6", - Page = 7393, - PerPage = 3901, + Address = "CgxYlFZzBuHZ8tjsh68ScZg3aAMErPcV9o0TcGJkIJgRMahTjY4B83KCbssdnciBK2yKUyBpazsFHLyPhoCqWWrzikH0DrThI9ndCARX9iZhUIwUrsQ8Uijo55dyiBxXbKWYhqIQcADAJhWFwASll2hGkEzja1Nm", + Tel = "078517159", + Email = "0dtBhucZ4e@0BzA.com", + ExternalId = "y80f2MmxJUnd92RrjDmsbpR1", + Page = 6697, + PerPage = 8233, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -142,13 +143,13 @@ public async Task ListShops7() { try { Request.ListShops request = new Request.ListShops() { - PostalCode = "829-7601", - Address = "gmDSuxOmphkziTG6p4HsLeIcNrFvlQBIX1JBgnrD1yLFlL5kbgs6xUgxf5sOofYseOt", - Tel = "03-1060591", - Email = "IVjtUkLTSk@OKux.com", - ExternalId = "3", - Page = 177, - PerPage = 7370, + PostalCode = "859-0057", + Address = "2pRvNpULEoTr6H5p2Y5YBaOZdS1seolNILNbVpFGvZ3N4x3uvaLnbw12Ii4C82SzJJG4lODNS2Ij7U5b72U", + Tel = "02-8987530", + Email = "Z2vkYmrCrW@wA7I.com", + ExternalId = "kDmk9acr8tX9JQSHyiFoseHqYyK8GIOW0PG", + Page = 5038, + PerPage = 4054, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -163,14 +164,14 @@ public async Task ListShops8() { try { Request.ListShops request = new Request.ListShops() { - Name = "9YuKsTGECVvJsAnqjel2la3rWWdK2ybDtXJiikZzBktm983ksDdKfbC96DBMvuC0QTfx8l2ZZBjyQqeO19KhFrkxiVRAQ6FFjz1wnjIRjO9MofqJJncHBCR1qP1zId4mLJCzHpOgkhaasWI8ELqJwRA62Ghe0ne6pcNR1V7JprfFD47gNL9WM6cSeojzOZZrLxO3x6r1ViuOnspa8l8OxqMpLrB8ZQmhXHGSV", - PostalCode = "776-3433", - Address = "OQMdHqZLlv01wGqOn2jIsFsWbo7bpQq9anT6PszkN335U1t4DYsuiE88p3Hog0k8dxuKgCFI0Qv1brn8ATMTNMMEyVApkaDeYuOtBoCZgc4gwc8RSE7B5wsqfAkho5yO5EQGpb9AHk6UF1UjWUyw97H5Wi0UlM5hWRopq8fm3QjwrUJDS6QI", - Tel = "05-226375", - Email = "OQG1PZp7fj@d91z.com", - ExternalId = "g", - Page = 1313, - PerPage = 7470, + Name = "5uzPdd0dJeNNvUC0bqs1hvmd5I8evbrAQGpnYomE2cpD4cThkIOO2LW0e3G1sTmjjHcN57ZbAikJ2opGyr1ja3zumve771kQ7mwZnfGMQasC1yb1Dq2UL9Kx0jYk7sZRicOTg23f5GXrX6ozTzm0HG0TosxKz4jitwHtujKhwCFGwiyv4vlRB", + PostalCode = "2280688", + Address = "eKBVf4jVtecQNubIdHetIBPUrvpeN86f46tWgyM43AJZ0KTwWOYBSX4EzfsIiIDCSxoowqwobMRj4K8plKuk4zON6ls", + Tel = "041900701", + Email = "9YuV27x2ZZ@wJNP.com", + ExternalId = "J0aXH1uRWCYsw", + Page = 9952, + PerPage = 5943, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -185,15 +186,15 @@ public async Task ListShops9() { try { Request.ListShops request = new Request.ListShops() { - PrivateMoneyId = "728185e8-ad31-4fdc-9d52-a548ebf7bb9d", - Name = "tL55R7YEprCJ0U4QnLZWmGvTqLQwaZ9vOnv67spoRoPKUgWvYVa3Gv9xbfzvgScohGvfvszFZ", - PostalCode = "8303389", - Address = "rdyb8N5N4uLXeppDXZ9aq2pYugtiiL7qWoYElTKmZkEzCv7OKUa8NeEnF41", - Tel = "072132-6884", - Email = "SyQgT1GkRh@boXH.com", - ExternalId = "Y39x3Xs6KbKOjUQYLsphxNcJX", - Page = 5734, - PerPage = 3013, + PrivateMoneyId = "329b1a56-9852-4dc2-9566-5b1248f6f858", + Name = "AF7xeoT0y6lNlDnKEOyMV89HU", + PostalCode = "057-6476", + Address = "kSpdcLQvsJQRiuvWpRkphzntqbTr2v", + Tel = "0666-7862-3097", + Email = "dBxe8hiTzw@kLtz.com", + ExternalId = "fAa", + Page = 8603, + PerPage = 2616, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -208,16 +209,16 @@ public async Task ListShops10() { try { Request.ListShops request = new Request.ListShops() { - OrganizationCode = "-8y7-7-zKsxh-i-NcR0D-", - PrivateMoneyId = "84adb392-9e81-4bfd-ac71-595667491e24", - Name = "tFI20RqU84wWVej7KjR7PO79YOuc2btzI2HvKaIy1dRKuzOlLMmdBSZr220xtZpZdQ9ssluYJHAlylPpV6xWxt7f2oLFlgp2lLhVbHghg4lZSVxXqYiDQPFv2xIXmI4PlPvyiodipyOhBLvJd18F7msVC", - PostalCode = "9196121", - Address = "ZCm153pAwidsKM1ZphpLhv7NIoqmlJpzKOYIsRtFF9xx8GHcZXN3Xa70o7nFXURkjCcagg1x0DCy4shXKR7nTWCyIt3Gr6ubUQRiycmsaOa8T2aG0PP6tnqHnuoUILOizvfJbTrh0kbVP56HQVtzlq6MKoBezSZGJZ1h8km3mkAPAZ0UMnnwl", - Tel = "0245704778", - Email = "4BT2IdLeJZ@DTCE.com", - ExternalId = "i4ZW2q7YUbIlt759XkPd0Pd9Lm5F7", - Page = 3953, - PerPage = 5488, + OrganizationCode = "t50ubO70jcnj9t-335CJ-s-WrtL", + PrivateMoneyId = "6aa80989-5b3f-4906-983b-adb7070de342", + Name = "6AmswdAM3IJrwVbs9pMxfMCthiv1a2EEHFmQw4OmJsXraAGliEBPmHrH76ocsr7yZptwOIMGRxZLktLdV7uiWarFr5GP0wp4l70ZsGyPlyZYRURgUMf0P5ozHDn0iOeoWIRRMyR0nQkh8Zz7eaFGoiOPKR0rUW9UTcnGDBsZuPfABdiNvfS9Anufij6THnocikBJOkD3FvwnaI0WeO", + PostalCode = "740-3242", + Address = "mmegc1KGhe3TxnuKac7CS1DK4Gnrr3oBLGMXHrz9mqfRhRmUp8pN9pjtBKEK1", + Tel = "0339938-340", + Email = "Zmu6u7tOxq@uneN.com", + ExternalId = "tGolCf6SjeF7SeZXyMS6WkNJ2GvSwQUcru", + Page = 8154, + PerPage = 2613, }; Response.PaginatedShops response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListTransactions.cs b/src/PokepayPartnerCsharpSdk.Test/TestListTransactions.cs index aa63473..1dd4fd9 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListTransactions.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListTransactions.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -37,7 +38,7 @@ public async Task ListTransactions1() { try { Request.ListTransactions request = new Request.ListTransactions() { - Description = "F4fJVtnG3Avmta20vIgud6F1UgGMHbk2IRflsvwuZxk0nQmXMvg0FcWUrBHOSV7LC2s46hfsRF0YKxTClCMK7WZ9", + Description = "gPMdYrCUsTg7mFBD5JyTl3OSbQF6o9LFFmkiVCdqahnf", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -52,8 +53,8 @@ public async Task ListTransactions2() { try { Request.ListTransactions request = new Request.ListTransactions() { - Types = new string[]{"exchange_inflow", "topup", "exchange_outflow", "payment"}, - Description = "kjfoAuPSksHUuefNAm0yTlB8Y7jnhE6v0ICVfZpB32LWZFMYYNQ77hNnDgeQkP6BrHNLW2TjgwJkClY", + Types = new string[]{}, + Description = "R9DfMzD3LCASqee9bY3sHOGNF3Mai4m7no77RN8AasCH56gnyuHFpFsNPJmzuH1GHYOOmiUvKwyiQYSSoPK3N5ZGrmU0unMptspEioBBqGcJLaXcepDTPRHElLNQrvWUnk17KWAioiFIGH7s", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -68,9 +69,9 @@ public async Task ListTransactions3() { try { Request.ListTransactions request = new Request.ListTransactions() { - IsModified = false, - Types = new string[]{"topup"}, - Description = "jLV6mNckmXW", + IsModified = true, + Types = new string[]{"topup", "payment"}, + Description = "5S2r82nr4", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -85,10 +86,10 @@ public async Task ListTransactions4() { try { Request.ListTransactions request = new Request.ListTransactions() { - PrivateMoneyId = "a40cfb3f-af62-467d-b6e3-c1af51828844", - IsModified = false, - Types = new string[]{"exchange_outflow", "payment", "exchange_inflow", "topup"}, - Description = "EvT1fZYocBrtgwRLixenA1GWqf2JPqamqpbbuSj1PURjYRasH9ARntTDK9f1O2csoG3", + PrivateMoneyId = "889e4085-0dae-4c43-a83e-3e2dcfa49e8d", + IsModified = true, + Types = new string[]{"payment", "exchange_inflow", "expire", "cashback"}, + Description = "C6IOlQ3ZCa8lZmMT5mAFAIeN7EOzXnRCcbLOsMiN4tjoxBAROpiRc0j39oPNk", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -103,11 +104,11 @@ public async Task ListTransactions5() { try { Request.ListTransactions request = new Request.ListTransactions() { - OrganizationCode = "ig--4-fcSL", - PrivateMoneyId = "aa92f50d-93f6-40a2-9803-fed3e036e42f", - IsModified = false, + OrganizationCode = "fTKPUe1w6KO-cq3kHfugs-gv0j-5-", + PrivateMoneyId = "9c616828-afa0-48b1-9e9f-37c8022ec883", + IsModified = true, Types = new string[]{"payment"}, - Description = "KMzKtPMLBX6YLvmDqPAbWtHJHRtQBqCHsxk71kIOiSH", + Description = "wM52367FRSK6ZN3dPGJYhssMJ1c81K9V4uwaN6FqKGuMQEbIhSKLSxcJDAAH0jwIPbMhYlMMXruKsOetb8P3w3wpAlq46MRFhBa1KSFCImukjAtQPb0UOTifX7KrzTtAdse", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -122,12 +123,12 @@ public async Task ListTransactions6() { try { Request.ListTransactions request = new Request.ListTransactions() { - TransactionId = "0fb67407-43e3-4511-8399-d1974a85b8da", - OrganizationCode = "F--Z-5I-1mh8EC-B8-ZcAV-", - PrivateMoneyId = "efd2a76f-9ab7-4890-9a8c-efcd17be6265", - IsModified = false, - Types = new string[]{"topup", "exchange_outflow", "payment"}, - Description = "Rh4S0mExQI1uCwHXvSS9xqXNJMeqv2rRxx8SeYgA5RTAZIE0d3whSKLF4xWXCgQOdSsQVPrApoltrzZbMjGbqCaDUv1CsWTy6z2FdXbfXavW2Hwa", + TransactionId = "51TT", + OrganizationCode = "-iLW-Q-", + PrivateMoneyId = "2214ddc3-4de3-41c8-accd-75e1f5fddc40", + IsModified = true, + Types = new string[]{}, + Description = "OIiZjdOoQxmayWcgZvBQUAudiHvhALf0xr0YedjAtAhk4Q5ZEYWHc6DIDKem3xaXPio5o0q9x0iUyrfJOMPlYYA9d24g2qlkQeuW1v6Ot04JjRtKJ3Y50yRgOZb7LyYKRMPV8lVcOO1w2GShMQxP1XNaA4tMwkt9CEIs7P52Qn8Ps6rGg4gxhQEPHlDMgzo7RyqyjD", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -142,13 +143,13 @@ public async Task ListTransactions7() { try { Request.ListTransactions request = new Request.ListTransactions() { - TerminalId = "8e458efe-91de-4e56-8fd6-ded7b78bb2c7", - TransactionId = "2f6339e3-904f-4df6-92e7-a2fe07d2701f", - OrganizationCode = "qh2M--2-9BgDQ-L41a5t16640PHY", - PrivateMoneyId = "e4fae6f0-0800-49c7-8372-bc4f3be9d20a", - IsModified = false, - Types = new string[]{}, - Description = "VQZjHwhb9lV9sTjbq8Wo22UU1er3T1gBtfr20CiDsCwyLdW5AzEeQbE5VhNxjrtNh84WLuHKWoYQpDLtJyiWbDVy6Ss7attO0KDvZ2PuoFKU33PYYZTEIyRndmm72c26Cd6B3OB7swghUIdkqUOY2HAI87h7tC8vMnTzjNmFWDzLZEPN7HQXw", + TerminalId = "ff130851-0143-4076-8919-72817621a07b", + TransactionId = "LohtP7Y", + OrganizationCode = "K--lYK5fg-EsaGa-K21r-d--", + PrivateMoneyId = "2aa3cb3e-3402-46a1-a5d4-d2acf092321a", + IsModified = true, + Types = new string[]{"exchange_inflow", "topup", "expire", "exchange_outflow", "cashback", "payment"}, + Description = "EZ1qV4Ufa8eDKBhpNX1jWPk8Z43B0y0B9mfs2NjGqIbT9OwqnkaPpwID0e", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -163,14 +164,14 @@ public async Task ListTransactions8() { try { Request.ListTransactions request = new Request.ListTransactions() { - CustomerName = "mFrbXYvN3cal4RO9jT63dRDxKNVoewLoaJggIMA5wXB3CTdPu3I6Gb57N6Bfk723xgVJhWc2FLmu9RV4wTQ1eFfFoOmA6KgKFTgUMIqeaKPydQtxKkPEiJ9F7s", - TerminalId = "afc82730-867d-4fb9-b384-fcb2f9f13d44", - TransactionId = "50349298-229b-4cb0-b75a-2dca7e16a0fd", - OrganizationCode = "H64O--QS--G-q--P-6", - PrivateMoneyId = "a259373f-52a9-4586-ac65-5cab84228a3c", + CustomerName = "LyZpFNZ79b", + TerminalId = "ef4dd3df-08f5-413c-b380-c9dbf36f898b", + TransactionId = "5", + OrganizationCode = "----Q3I6AC--de064H-xR-ip39p", + PrivateMoneyId = "a8f139c5-42da-42af-8d7f-e5250fb628c6", IsModified = false, - Types = new string[]{}, - Description = "Zr9Xo8DUROCVDxPSk72x92MmliF75MFhbZKuKGU7dTPisUgKnCVzFujd5tp1lylHobnm6HycWppeOG5c4bSq", + Types = new string[]{"topup", "expire"}, + Description = "16I7iXigWOnUAkBWGfv1h3SdKWf7Mk6qxlTgasH1", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -185,15 +186,15 @@ public async Task ListTransactions9() { try { Request.ListTransactions request = new Request.ListTransactions() { - CustomerId = "6d04b015-9c56-403e-82c7-808b9a0345fd", - CustomerName = "p3Ank6BTTvgxHzzgdLIxgPMdYrCUs", - TerminalId = "90023026-69bc-407c-948d-9e11135456aa", - TransactionId = "3c5fe1e7-910a-46e0-b704-41ed5d3c1c46", - OrganizationCode = "67", - PrivateMoneyId = "694d2edc-4dab-4d19-803b-cc69c379a756", + CustomerId = "52845131-cd8d-44da-95fc-9793404d60e1", + CustomerName = "Wwt0KCw4FDQO05qLTqGDbzQDuaFv4VsaDUMga8HPHLfj8VAxLQCn6DppPY7uZKs5wMf3MBYDCuFCMBOgtd28MFakoJp4sttlPyu0hLTf3LV1FvqM27O2bqybT3XFSWXNEvBDebROkI568yn3vAdg2WzE6cQfJbdKVhYmdIeaGtyZiVBFtaHsVEu5jHLt1IIKsQ450xUM6O5hfI4vi32RsgmtpDzruBR2bpCJbWCsF", + TerminalId = "eb701a31-5958-444f-86cd-02f7c81c4c1e", + TransactionId = "bCbRi8M", + OrganizationCode = "4T-9Hu-9WU487tN-3", + PrivateMoneyId = "a3e101fb-a33d-40fe-b494-31d6ffea551c", IsModified = false, - Types = new string[]{"payment", "exchange_outflow", "topup", "exchange_inflow"}, - Description = "qahnfY1HR9DfMzD3LCASqee9bY3sHOGNF3Mai4m7no77RN8AasCH56gnyuHFpFsNPJmzuH1GHYOOmiUvKwyiQYSSoPK3N5ZGrmU0unMptspEioBBqGcJLaXcepDTPRHElLNQ", + Types = new string[]{"expire", "cashback", "payment"}, + Description = "2tI5N4bIOpNtWwRJ7taFGOOZNR9womkOYYXss1h0acoAUmABE9DWtANH45sfx8Sg9q1O62IQSAJ63xgskw6yfFQPcXHRn98CcSXK5Zlq5PBZ9vRV0xbdBDEvd", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -208,16 +209,16 @@ public async Task ListTransactions10() { try { Request.ListTransactions request = new Request.ListTransactions() { - ShopId = "5dae2af2-ebf6-445b-bad7-fa3b475d913f", - CustomerId = "6e68a055-afa0-4f82-886e-1001fd307d6b", - CustomerName = "7KWAioiFIGH7shpxz5S2r82nr4Char2DsC6IOlQ3ZCa8lZmMT5", - TerminalId = "fcb66ced-3d2c-49c1-9b8f-2546816ea216", - TransactionId = "dd584a5e-f8dc-4441-bd3d-39c963bad19c", - OrganizationCode = "3So-gBis-Dk--zO-olBuG-7XhI92-qH1", - PrivateMoneyId = "6033af2a-2850-4426-a6d7-1d4450a2086e", + ShopId = "da583a28-d396-41fa-89c8-e914fc2c9aae", + CustomerId = "3167022e-94d3-45bb-b581-a4cbe2becbab", + CustomerName = "84n4B4JwtxMbsrynFzleqVzZvPQrwaZ5xfzumz05DAlrcpNez8TuusjLCXuqGq9aXt2RyxOmHZB8Yd9TYL0bkCAVqSRIdac4BtBwC2bbOKrqEvtHSmLf6gZqSXb2Lr55RtyiRtGJ1HUxolj1KPz6vAaVd6Sg4zOt2LPb0nLBvCfu5QWsdUnRrH9KHVuXFGKt4lw9lRVMCA", + TerminalId = "aff597e8-7349-4c16-b8f7-1d08a8caabe5", + TransactionId = "f4mhVFw56", + OrganizationCode = "X-ht--D-8v77zAmT71--GS-Sh23-x-", + PrivateMoneyId = "2e41e3ce-0b8e-45dc-975e-5a9f80c6650e", IsModified = false, - Types = new string[]{"exchange_inflow", "topup", "exchange_outflow"}, - Description = "peMsqUtDBV", + Types = new string[]{"payment", "expire", "exchange_outflow", "exchange_inflow", "cashback", "topup"}, + Description = "mOaSDg31Umvi1k0xZepHVlU5UCBk1mC260SZIPf7lUxpBEwOCUnBV1wl8i3xQfqNGTjhBSpAIG2GVjRLCF7S26ypTzMExe5LQXN3tfMMeaiTEdRlgPRLO6iu4xB9p9", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -232,17 +233,17 @@ public async Task ListTransactions11() { try { Request.ListTransactions request = new Request.ListTransactions() { - PerPage = 2023, - ShopId = "97f940b5-bbca-4005-8ed7-c1d0858659c2", - CustomerId = "3a0776c0-7bfb-4a70-bad3-1800628e550a", - CustomerName = "tetKx5V0IU1H2quyHwM52367FRSK6ZN3dPGJYhssMJ1c81K9V4uwaN6FqKGuMQEbIhSKLSxcJDAAH0jwIP", - TerminalId = "51efd7e2-6f9d-4bac-a9cd-bf5d5db4905e", - TransactionId = "29a3eaa3-231c-451f-a8d9-faec39ca81ad", - OrganizationCode = "nI-s85b-BLd-6dCV-0Brcq", - PrivateMoneyId = "64ce4fd5-e801-44cf-9412-9d80b97a29bf", + PerPage = 9833, + ShopId = "893ca648-9656-4126-85ea-7bf53a455b12", + CustomerId = "b4242a8f-eb46-468b-b305-a61104f9a6eb", + CustomerName = "UixLpvflY8MFYZJvlfPZ9XRs2DjUex8FZcru468uiy2IBQsKNbECUonyUv3nTPZ701h3V5Qywi2pn04JUSx2", + TerminalId = "d1f39f2a-b092-4002-a45f-bc20449d9481", + TransactionId = "eVHz2wOx", + OrganizationCode = "2mo7-c--6k-6HA3IhSPF--Ue-xT-4af", + PrivateMoneyId = "89d58316-8711-4ff4-9ad8-f03910cfe9b7", IsModified = false, - Types = new string[]{"payment", "exchange_inflow", "exchange_outflow"}, - Description = "7KrzTtAdseC51TTzGU05VTqLiAQDTT40IDYkIvu0sCcHMaDTHEOIiZjdOoQ", + Types = new string[]{"payment", "topup", "exchange_outflow", "expire"}, + Description = "SO8H2DCl6imPJgn2XjYsZUpQvLebh65Hdtxmvs4SwxRthVVayjO1th3s3e6fayZ2E32vm3RMvvWttu1PJb3d04IfskzbRh2KXDkJqy1UyPaGHVkyMSdmemZcovbEUc9TiM3DTSa7pJlo8JS", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -257,18 +258,18 @@ public async Task ListTransactions12() { try { Request.ListTransactions request = new Request.ListTransactions() { - Page = 5497, - PerPage = 9594, - ShopId = "d03d8be0-1757-4c89-a30f-613e284a8ce7", - CustomerId = "1316862f-53a1-469d-8092-487bd5226a40", - CustomerName = "vBQUAudiHvhALf0xr0YedjAtAhk4Q5ZEYWHc6DIDKem3xaXPio5o0q9x0iUyrfJOMPlYYA9d24g2qlkQeuW1v6Ot04J", - TerminalId = "6dff4f01-af6a-47d2-be74-c8e0d4ef07dd", - TransactionId = "3d08c424-18a1-42a9-9ecb-b85d1e6e884a", - OrganizationCode = "-mdp-X7--l-6Y0rQy1", - PrivateMoneyId = "dcc480ac-5d41-4298-b474-fb4dd4432d13", - IsModified = true, - Types = new string[]{"exchange_inflow", "exchange_outflow", "topup", "payment"}, - Description = "CEIs7P52Qn8Ps6rGg4gxhQEPHlDMgzo7RyqyjDQCvIVLohtP7YX7LIJvkHIDHAM5JdvPW8u4K9jehE0FIX2d1fsIJRaq4cseT3Jr8x9EZ1qV4Ufa8eDKBhpNX1jWPk8Z43B0y0B9mfs2NjGqIbT9OwqnkaPpwID0eLyZpFNZ79bus52pNLLPoSL84S", + Page = 5431, + PerPage = 7439, + ShopId = "41381a92-6ba6-4e14-abed-0c0585582ec9", + CustomerId = "8e3cadd6-2be6-4bc3-84ec-a97fc9a648df", + CustomerName = "8O6XTpGUPEJOaNnRanlNyuKHWuXq7zEzVgAAIhzrVmMQ7zQf4j1Xlnx61iQEXBdwXQXBx9CjvSgZke3VuPIIBeUSxLQqoj9SXP9EgDJcoagTJNb42JvVKNsj3zA7Dw0uibv", + TerminalId = "2e906136-e590-46be-8f30-c81a4f25116e", + TransactionId = "aLFwVLI", + OrganizationCode = "-d4---1DT-q-j3E-2-2vc3u-SL", + PrivateMoneyId = "fb6afb43-dcc1-4434-a535-d87cfb9da6b8", + IsModified = false, + Types = new string[]{"payment", "exchange_outflow", "expire"}, + Description = "0xNjD1g6ausYOsWjmgSVes0LvRpIOKLgAa2m76DTKceEBbKe1QbzWrTYvHigdBYvKVDd", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -283,19 +284,19 @@ public async Task ListTransactions13() { try { Request.ListTransactions request = new Request.ListTransactions() { - To = "2015-12-17T05:32:38.000000+09:00", - Page = 7262, - PerPage = 5704, - ShopId = "e82469f7-3983-4b97-8190-f22ad3a9db2e", - CustomerId = "96c233c3-1fc5-4268-96db-2f9cd23b3e6f", - CustomerName = "VmB4cFvbTIGcXWAqG4BSfipEZMFGhk16I7iXigWOnUAkBWGfv1h3SdKWf7Mk6qxlTgasH11ZahWwt0KCw4FDQO05qLTqGDbzQDuaFv4VsaDUMga8HPHLfj8VAxLQCn6DppPY7uZKs5wMf3MBYDCuFCMBOgtd28MFakoJp4sttlPyu0hLTf3LV1FvqM27O2bqybT3XFSWXNEvBDebROkI568yn3vAdg2WzE6cQfJbdKVhYmdI", - TerminalId = "dd96efe5-4be1-4cac-9dfb-e509011991c0", - TransactionId = "d1842a47-085c-4c74-a49d-097989f0e19d", - OrganizationCode = "l-UB-y5Wn--5I--9u393gS--s3", - PrivateMoneyId = "fe6213e7-e07d-4a7e-adfe-2cf43ac6f070", - IsModified = true, - Types = new string[]{"payment", "topup"}, - Description = "uBR2bpCJbWCsF1XOMwOMfbCbRi8MeoObjQBbD5vivOmPF0WWyAe43BTjYiVtdGDmgs4Vk2VUx2tI5N4bIOpNtWwRJ7taFGOOZNR9womkOYYXss1h0ac", + To = "2020-11-17T13:21:59.000000+09:00", + Page = 1829, + PerPage = 1879, + ShopId = "9a784064-d673-47ae-88c4-6c21bce9089c", + CustomerId = "42a65923-5789-4806-99b1-ce48e372a261", + CustomerName = "rFGRZ0Q28L", + TerminalId = "ed1c8790-2e79-4ef7-9a8d-b3d6c7e79e47", + TransactionId = "z2sIRx", + OrganizationCode = "B0za8tu8TiZH341O", + PrivateMoneyId = "65771283-7b8b-4f8d-a2e0-bcd0b6d3fb16", + IsModified = false, + Types = new string[]{"exchange_outflow", "expire"}, + Description = "irLmp7HiQajpl09d6QIiaL5c40GPi4ivBi3eJhDgAiQ5", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -310,20 +311,20 @@ public async Task ListTransactions14() { try { Request.ListTransactions request = new Request.ListTransactions() { - From = "2017-06-11T03:38:01.000000+09:00", - To = "2015-11-22T15:59:25.000000+09:00", - Page = 1622, - PerPage = 1059, - ShopId = "dd17bced-76aa-4cc1-82a8-c1450ce3e6b9", - CustomerId = "59b79ec4-2f57-4974-814e-a4206a752548", - CustomerName = "5sfx8Sg9q1O62IQSAJ63xgskw6yfFQPcXHRn98CcSXK5Zlq5PBZ9vRV0xbdBDEvdzHS5KI84n4B4JwtxMbsrynFzleqVzZvPQrwaZ5xfzumz05DAlrcpNez8TuusjLCXuqGq9aXt2RyxOmHZB8Yd9TYL0bkCAVqSRIdac4BtBwC2bbOKrqEvt", - TerminalId = "c0716dc8-7e53-4bed-a5df-c42ab08daccc", - TransactionId = "9bac8fe6-e33d-40db-b67e-67e70c3ab2ad", - OrganizationCode = "10-7--Wn--w1A-43n-n7u38w9q", - PrivateMoneyId = "ace6436e-314c-4242-b6c3-8ce6c180cdf5", + From = "2019-01-09T04:25:26.000000+09:00", + To = "2025-07-22T16:47:29.000000+09:00", + Page = 7288, + PerPage = 959, + ShopId = "3334017d-b35f-4586-a3c5-137d95302a29", + CustomerId = "da76d485-3f0d-4766-9094-9a11464fb66d", + CustomerName = "yakwCi2K41MKrJ8u3JtJHw13BJLqURa9CDG8z1r52NxmvSo3IMgKOG9RqgqLtsxscDVj4qDxwlIsjYdDsgNzWfMVYN8tFORiCKaN1GSBkTmsnETZgON7wI25XD4LDGgtc1eHQx1a38fcy9G2ru7CIugZBUKc64A", + TerminalId = "777f1cb8-c588-4fa3-8b86-315ef58efeae", + TransactionId = "FHDE0", + OrganizationCode = "FmL9wT--116J-i9-wg-z-3", + PrivateMoneyId = "c3f6c7db-749b-4fbc-a543-b1dc3b764f28", IsModified = false, - Types = new string[]{"exchange_inflow"}, - Description = "WsdUnRrH9KHVuXFGKt4lw9lRVMCAhIxweHf4mhVFw56RKDemCYdfHKy6kNARZB0e7gSo7Ck5GjWL9QXL9sfwRokQiO2gJLOs7NWiVmOaSDg31Umvi1k0xZepHVlU5UCBk1mC260SZIPf7lUxpBEwOCUnBV1wl8i3", + Types = new string[]{"cashback", "exchange_inflow", "exchange_outflow", "expire"}, + Description = "19XaUt7HUg2vBtQ3icUlEOMImvGy37aG3VpRlqKVbLVJ59qzi8HFxZtC5ypm8TU2Y6m10oazOnSDRVBADkHpYoJtK8deELoxPb8vCqW8ZrqfNGAkbzmAIScfq8J", }; Response.PaginatedTransaction response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListTransactionsV2.cs b/src/PokepayPartnerCsharpSdk.Test/TestListTransactionsV2.cs new file mode 100644 index 0000000..5523938 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestListTransactionsV2.cs @@ -0,0 +1,368 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestListTransactionsV2 + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task ListTransactionsV20() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ); + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV21() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + PerPage = 766, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV22() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + PrevPageCursorId = "f23dfb3c-d41c-41b3-9ee1-ee815b6ab0cd", + PerPage = 52, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV23() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + NextPageCursorId = "ba561d3f-444d-41c6-ac0b-5153fdaa47ee", + PrevPageCursorId = "1417e536-7921-4c5a-a239-539d82972cfe", + PerPage = 48, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV24() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + To = "2019-08-06T13:05:49.000000+09:00", + NextPageCursorId = "1f35db70-8630-4b3a-a40b-705924be95c1", + PrevPageCursorId = "2d3588c9-2d77-46cb-907f-0a1ed3f4776e", + PerPage = 750, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV25() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + From = "2018-11-07T10:47:46.000000+09:00", + To = "2017-10-31T01:07:34.000000+09:00", + NextPageCursorId = "372e71c8-ca69-400e-af8c-541e6d4b754b", + PrevPageCursorId = "b23030ba-eb37-4eb7-b5a0-86c6c0c4db55", + PerPage = 491, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV26() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + Types = new string[]{"exchange_outflow", "topup", "exchange_inflow"}, + From = "2020-05-24T17:36:21.000000+09:00", + To = "2016-12-31T01:05:13.000000+09:00", + NextPageCursorId = "8fbf65c6-e8ad-4e55-8cc0-81486cdcb5c3", + PrevPageCursorId = "d3d03f11-76b5-4997-be78-6e2326c6801a", + PerPage = 384, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV27() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + IsModified = true, + Types = new string[]{"cashback"}, + From = "2020-07-27T22:15:44.000000+09:00", + To = "2018-04-20T03:35:35.000000+09:00", + NextPageCursorId = "2ee0ef4b-347a-40bb-8545-5e46d1ce1e72", + PrevPageCursorId = "8b340176-3230-4a84-86f0-96b569f2b4d6", + PerPage = 68, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV28() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + TransactionId = "2XFSxI", + IsModified = false, + Types = new string[]{}, + From = "2018-10-22T21:26:40.000000+09:00", + To = "2020-05-23T08:19:55.000000+09:00", + NextPageCursorId = "294d4197-8c63-4d36-b6db-313371b196bc", + PrevPageCursorId = "36ef5f0e-8275-4b9c-b95a-021040631461", + PerPage = 551, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV29() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + Description = "EMZ2Ju8UbXHSU9E0Qlg3gebvAwjzG8UYapgA4DXNtjsg9PgQkXqYPn4dGIxCAVXu8wPFdMI0g8RX9GwTm1EaeDH0runisLVA8D7RtvLwRN8QmXijHIyMGxrgTxrmP2c2b7AqdqrRaU4tsNqOUthYSxSa5qYfKcdpEzIZoGgQ8JT7nM2XSRS8qzeJVaYua2WPHw1U", + TransactionId = "jf1qu", + IsModified = true, + Types = new string[]{"payment", "exchange_outflow"}, + From = "2023-04-19T18:37:40.000000+09:00", + To = "2021-12-24T19:59:15.000000+09:00", + NextPageCursorId = "574cb36e-e328-4aa0-874b-7db30643aa33", + PrevPageCursorId = "90d0d627-fe16-412a-a6db-2459e0bf26b2", + PerPage = 138, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV210() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + CustomerName = "PKkmh", + Description = "gdj", + TransactionId = "1RbwEd", + IsModified = true, + Types = new string[]{"payment", "cashback", "exchange_outflow", "topup"}, + From = "2016-12-18T19:10:28.000000+09:00", + To = "2017-03-01T22:29:46.000000+09:00", + NextPageCursorId = "faa5b900-9944-428f-9a2a-b745b058a667", + PrevPageCursorId = "de760078-73fb-4ab5-8577-64070047582e", + PerPage = 198, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV211() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + CustomerId = "207a091b-4c99-45dc-aa92-fdd4633ab088", + CustomerName = "OvQdZofRUOUAciXVcpzKCMcrOD6Emk2wkp2iXzqZDQWG9JIPYO9QhKjYAAaWngq9PQfQxKRvEszf3mWAEHwNafuFelOU7xCAyi0eUz4xXH5OLhVoB1lIuiOfxpiSD0ualUMr1aiXbRr0Yt6Ont0eqhymEV4KDx3FmD9kbbli1vOnH69EFivIjA", + Description = "6JEHCCuKlnfNVTWFTkh4YZxFDhr8QjYlB42", + TransactionId = "AhylpmFO", + IsModified = true, + Types = new string[]{"exchange_inflow", "payment"}, + From = "2019-12-01T08:09:28.000000+09:00", + To = "2016-04-16T09:54:49.000000+09:00", + NextPageCursorId = "18247ec2-021f-45da-a472-d81e19d13e67", + PrevPageCursorId = "4861db91-7698-4d9d-a8b9-d21c6724cbb8", + PerPage = 148, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV212() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + TerminalId = "5722f1a9-4ffd-4bd2-a33e-5973cb3e846c", + CustomerId = "3d5dd7c4-31bb-4724-845f-efc227a88a14", + CustomerName = "oJSIFUrTRne91u8KmONYXCce6NgXmM6SU8mT9N7YdoyhvIOK96oQgvpt3OE4bGWfPwqWxwC3DU0ZYNIFrYHkTuOzrywGRNkAeSHinr7X7r9y8K62vZdczx", + Description = "zKDF7OzztIRdIBCYTSHrtKwDRbFJx9qY9kB8kVDqJ", + TransactionId = "Mjy6rf", + IsModified = true, + Types = new string[]{"cashback", "payment", "topup", "exchange_inflow", "exchange_outflow"}, + From = "2017-01-21T09:05:02.000000+09:00", + To = "2022-01-17T10:42:01.000000+09:00", + NextPageCursorId = "8e1f4384-77d5-4ec8-a4a7-cf27063f9dfd", + PrevPageCursorId = "964ee947-fcbd-4659-b963-3336009a1d16", + PerPage = 354, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV213() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + ShopId = "843efa88-d4f6-493c-b284-bc825b68fc69", + TerminalId = "6f87cf5b-6c13-41ee-af05-c451c2e974ed", + CustomerId = "a2044eef-963b-440b-b37a-73fafcdce77a", + CustomerName = "7gjncZRjG49ZyE9dB8fCGfTM2Oyolj4kfEe2uvMtiKxUivt9MIJ97msI3tBe6ti0SO07EXHC5hQ61pWDcVyEH0QvPCR5IiYZhX71qxxCDFjWtGssb86D9XZfo8j2fPJCGzVYdohDRxcepsSsdecspEcH6zAIM8ju98Xf3eDqYA5vYg7TRPpd99WNI7yrXSKnnTIb76zTEtm8AaIiuGx9L9HalOMU5vigXX7Icn5jXA5", + Description = "xJPbbGkUILhTXtRtmknLVk7hQOvzRC9zFhAU2LnJOGL09rrRBaBOdWWGJsxArgIuumMVdl31leH5Dl7ZUH", + TransactionId = "zS51rJLdw", + IsModified = true, + Types = new string[]{"exchange_outflow", "payment", "exchange_inflow"}, + From = "2024-03-05T15:58:13.000000+09:00", + To = "2018-03-17T03:28:47.000000+09:00", + NextPageCursorId = "e539eb72-6c30-4c37-b8fc-d9f9fbe44c57", + PrevPageCursorId = "7b7c3c5f-2a95-4ff2-b07a-888a59dfc9fd", + PerPage = 844, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListTransactionsV214() + { + try { + Request.ListTransactionsV2 request = new Request.ListTransactionsV2( + "3b7ec431-ccbe-4203-ac3c-d168bb673b22" + ) { + OrganizationCode = "q-CM-uQ--pFfQ---hP", + ShopId = "e9a689cc-cf03-47e5-9c89-eff4913535f5", + TerminalId = "07884c70-4ae9-45cc-87a2-a14aa537b547", + CustomerId = "ffbce94b-b298-4c80-9f24-0041baddc988", + CustomerName = "08kULtDXm7mGq20CccqYOFtqhMLy1fS", + Description = "rOZfnZ2mwTeB7HbtOFrcDL7mosyloW0gLyNig5qU771SYwG9bLFfHIbs98VpOgmc8pS7WZiumuB2TNJcJGvSmksA1MuW1A79SIV4QucaCTIuwp4PaSBE0QhobjzNQVW3hP0Ve0rN3Em7q1SjNjatjjDZX7RIKgDX3", + TransactionId = "9oA", + IsModified = false, + Types = new string[]{"cashback", "payment", "topup"}, + From = "2023-01-09T07:14:02.000000+09:00", + To = "2023-04-23T06:24:20.000000+09:00", + NextPageCursorId = "d07de8a5-468e-4a6b-b069-38f3c04a0430", + PrevPageCursorId = "32e841f1-0879-47b5-8d66-d0c9007e208f", + PerPage = 137, + }; + Response.PaginatedTransactionV2 response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListTransfers.cs b/src/PokepayPartnerCsharpSdk.Test/TestListTransfers.cs index 45a64eb..0da83f9 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListTransfers.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListTransfers.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -37,7 +38,7 @@ public async Task ListTransfers1() { try { Request.ListTransfers request = new Request.ListTransfers() { - Description = "xR4GA8B6QEvmEtQTqfIDfhF08aWAgYKgMRg4eijui0x4AzukqXii06wz9NdLnaFp0d8NnYZXWwwPUfmYGEVrOM4dkj0diMGxwkBMFBNKhTrrGkGVnz7dW1L5JRcqWGZoB7J2SLBuVTFPFKYeglUQAESlFenRvUgW2C0Pk55puUaBmR66mDvQf", + Description = "INI7vj8qEDPsdJ8JkL6K4fbUtzmymsdzvhUXmrc210VozYCz4wR9Gfv1ooHMcqzJF0zVNZ8zHF5m", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -53,7 +54,7 @@ public async Task ListTransfers2() try { Request.ListTransfers request = new Request.ListTransfers() { TransferTypes = new string[]{}, - Description = "zEAz6sFhOXUyleHUBygYLLJFfbbjnOxn1", + Description = "l0g7uhhZVwBBSB9NQuG198o4cE8ye8xiCptr8X3OQSs9cvMVMzYpfEHHq4AVCPhpFJVl2NE9OohrFLhvABt92YjeNGkeRyZCxDwnyuzPdWfYw482S6oHFsZh9ksnqTSKQYaLtgBF21Mao0iMx72McbAtuQfbwPK5Ol", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -68,9 +69,9 @@ public async Task ListTransfers3() { try { Request.ListTransfers request = new Request.ListTransfers() { - TransactionTypes = new string[]{"payment"}, - TransferTypes = new string[]{"coupon", "exchange"}, - Description = "bDj1sJ7k6dP6L13ja9VovumOjMgFfs83kBzSot4H9G2QRAYPymeRfFOHsPVjb9UCbPcYx5YXiYOW0oa5SUOR88F7Ubd6EIlmfb", + TransactionTypes = new string[]{"payment", "exchange", "cashback", "expire", "transfer"}, + TransferTypes = new string[]{}, + Description = "5ClBnNsqGtwvAjO8SQrjpTlUKU7ix6v", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -86,9 +87,9 @@ public async Task ListTransfers4() try { Request.ListTransfers request = new Request.ListTransfers() { IsModified = false, - TransactionTypes = new string[]{"exchange", "transfer"}, - TransferTypes = new string[]{"exchange", "topup", "transfer", "campaign"}, - Description = "h3aM3MFSn6Z9Xp0dYAIwKPnm62HiK775FUjJKUwWsCFULHC5xu9xwKzEEFrv0", + TransactionTypes = new string[]{"cashback", "expire", "payment", "transfer"}, + TransferTypes = new string[]{"coupon", "expire", "topup"}, + Description = "Iv4Cy2qiGNeSDJueWNAF2iLhkB08mWoSEw4Yfnz5e3bjXKldANGzSZe49qKV1rholLnfHAgpNJKDDEjuzSmETPUL6TDRxNmjKW", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -103,11 +104,11 @@ public async Task ListTransfers5() { try { Request.ListTransfers request = new Request.ListTransfers() { - PrivateMoneyId = "c65b0a84-bb86-47f0-b5d6-b443a30c8b2f", + PrivateMoneyId = "e16c5914-c5d0-4c11-84bc-cec52b1041fa", IsModified = false, - TransactionTypes = new string[]{"transfer", "exchange", "topup"}, - TransferTypes = new string[]{"topup"}, - Description = "xeKc6v3uyZaCEMZ2Ju8UbXHSU9E0Qlg3gebvAwjzG8UYapgA4DXNtjsg9PgQkXqYPn4dGIxCAVXu8wPFd", + TransactionTypes = new string[]{"expire", "exchange", "cashback", "transfer", "payment"}, + TransferTypes = new string[]{"campaign", "expire", "transfer", "exchange", "topup", "coupon", "cashback"}, + Description = "Ulzsxb9tQKSZdMATJHlP3s2aiyvcn732KUYpvpwWJTv2DUcmsWBTf3SfgLVNlOhNoRUioebBno3HZhnyNZ5Q77U04aLs4hmy4C28WnCRfz2leovb1R7O6QOgboW2zpcaLxa2QZma6", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -122,12 +123,12 @@ public async Task ListTransfers6() { try { Request.ListTransfers request = new Request.ListTransfers() { - TransactionId = "a3f148cd-adc9-4f2b-a2b0-bb676afc0c5d", - PrivateMoneyId = "535f40b8-6a52-42af-a0d8-ac39e593f147", + TransactionId = "13cd8f43-64a4-4dd2-af3a-e9b8d8e7ed11", + PrivateMoneyId = "23b8caee-f1f9-489a-8a9c-c54f0d1a60b9", IsModified = false, - TransactionTypes = new string[]{"topup"}, - TransferTypes = new string[]{"campaign", "exchange", "payment", "coupon", "transfer", "topup"}, - Description = "H0runisLVA8D7RtvLwRN8QmXijHIyMGxrgTxrmP2c2b7AqdqrRaU4tsNqOUthYSxSa5qYfKcdpEzIZoGgQ8JT7nM2XSRS8qzeJVaYua2WPHw1UTjf1quigD2l2JnK33Y2", + TransactionTypes = new string[]{"exchange", "payment", "topup", "cashback"}, + TransferTypes = new string[]{"transfer", "coupon", "payment", "topup"}, + Description = "8QSZwJ1udEIb7zDJ6KZTEk0mDRGqd8jGihF2zo2GN3QYDG6CZS1PVe5LZzi2NmWBluHrzflOytNd3ROmH9nMfAHnX3LOs6P3dxLhDjrt4CFE", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -142,13 +143,13 @@ public async Task ListTransfers7() { try { Request.ListTransfers request = new Request.ListTransfers() { - CustomerName = "PKkmhgdj1RbwEdGAkTKdkwDZEgx5wET5OvQdZofRUOUAciXVcpzKCMcrOD6Emk2wkp2iXzqZDQWG9JIPYO9QhKjYAAaWngq9PQfQxKRvEszf3mWAEHwNafuFelOU7xCAyi0eUz4xXH", - TransactionId = "016dc3b5-d7cf-469c-8ce8-c2250cd9079e", - PrivateMoneyId = "4fdcc056-5e05-4eef-87c2-ad1ab99f2593", - IsModified = false, - TransactionTypes = new string[]{"payment"}, - TransferTypes = new string[]{"coupon", "campaign"}, - Description = "piSD0ualUMr1aiXbRr0Yt6Ont0eqhymEV4KDx3FmD9kbbli1vOnH69EFivIjA6JEHCCuKlnfNVTWFTkh4YZxFDhr8QjYlB42oGAhylpmFOwCdKPABZdrgh98R", + CustomerName = "SWJnPCLUxGLtrgoghS3pPHE574eeX1ksH4R2MgyW6z149JBRZmQUgzecqWdDVSstoEtPVoykbtA6l7WDayqQLAKXyhWYdlIHfSBBKI1KQl4cK6HLesoN7AsxjaX4b", + TransactionId = "103877bb-86eb-4201-9386-030084d299fa", + PrivateMoneyId = "49cf326f-8c57-467c-a435-785365e70602", + IsModified = true, + TransactionTypes = new string[]{"exchange", "transfer"}, + TransferTypes = new string[]{"cashback", "coupon", "exchange", "topup", "campaign", "expire"}, + Description = "E829PJZq44v95w5OTBAsM3ixdWcd35lzGg9k8zX5Zx6rdzZ6Kiw60EKpO7FL05ARSiRG2UPRPUxcw9rvtxOfCP20hUm1E2Nlz5V1CO5TSFyNtopqI6bCrDgQTiBz8hopleWuv10dzqDmxXKufPIjjJpzSXKPSRMVYMVxniANdM0yy6srRZNC9bYJUFWp4SJDd9Vw0g", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -163,14 +164,14 @@ public async Task ListTransfers8() { try { Request.ListTransfers request = new Request.ListTransfers() { - CustomerId = "4afd3c23-693e-4973-acc4-31bbf5a0a724", - CustomerName = "BuoJS", - TransactionId = "54834b5c-2549-4c46-95f2-4d29e2e821d4", - PrivateMoneyId = "f5f8a4d2-f1ee-49e5-b9a2-8631397a70f5", - IsModified = true, - TransactionTypes = new string[]{"topup", "exchange", "payment"}, - TransferTypes = new string[]{}, - Description = "Cce6NgXmM6SU8mT9N7YdoyhvI", + CustomerId = "f14c9268-689c-4c76-9c55-cdf79b5ef9c8", + CustomerName = "4GPMgqa4p3NBV6jnDEmNinmBAkCQlWqd4VgtaT7nx9nCCSGOYqsqY3PQB7j8S1LcJM99jV6h5DQ4TL9sXbFiutZ4wF", + TransactionId = "49410e93-bdea-479a-87ac-79991cfa4478", + PrivateMoneyId = "d426e9c2-e9ae-4589-9a89-577fa0f2e2cc", + IsModified = false, + TransactionTypes = new string[]{}, + TransferTypes = new string[]{"cashback", "topup", "exchange", "expire", "transfer", "campaign", "payment", "coupon"}, + Description = "e8Kxv6FPaZ8I6AxiybIUdjn2JlMSQ6V8dRYSFDiggsas4Nm4Pbqn0MLycuAIyd8Tc91YrDumA0BEPaxu5hz8quH88gYqQC45YQseyms9QyHVorEq6zLZyg3cEPs9bN7e1DJRmWCvXV5f7NFxRTTWOKh4cp2t8", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -185,15 +186,15 @@ public async Task ListTransfers9() { try { Request.ListTransfers request = new Request.ListTransfers() { - ShopName = "K96oQgvpt3OE4bGWfPwqWxwC3DU0ZYNIFrYHkTuOzrywGRNkAeSHinr7X7r9y8K62vZdczxzKDF7Ozzt", - CustomerId = "2b4181c9-483a-435e-baba-78401722ad20", - CustomerName = "dIBCYTSHrtKwDRbFJx9qY9kB8kVDqJMjy6rf4CluMJ3q8UHdGY9c6av2inoQmoszzzj7gjncZRjG49ZyE9d", - TransactionId = "301147bc-3a2f-4fc0-82fd-82b858b3ea40", - PrivateMoneyId = "f2e96a66-0843-4d9a-ba2f-42824b382693", + ShopName = "rtdj0", + CustomerId = "85f86e46-bc12-46b8-84ab-35dbc74d039a", + CustomerName = "2hhuu2d72PSRBNNGTP71wcJLJGkIvTZnRNAv7oeQjUez1G0bwCFurxmaLHHuXDOcuycPW2WYY40yWZt9ZjHKqLir6qmCF3zfoEN4hG6jzrPFiN4YTSJ9o4hVc0u6tzaZ3s", + TransactionId = "439957aa-5662-41d9-8b11-577f4a10788e", + PrivateMoneyId = "217eb500-69df-4f80-9e2d-b4c3287696ce", IsModified = false, - TransactionTypes = new string[]{"transfer", "exchange", "payment", "topup"}, - TransferTypes = new string[]{"coupon", "transfer"}, - Description = "lj4kfEe2uvMtiKxUivt9MIJ97msI3tB", + TransactionTypes = new string[]{"transfer", "payment", "exchange"}, + TransferTypes = new string[]{"payment", "transfer", "campaign", "topup", "cashback", "expire"}, + Description = "RswwQSmiJco3KwhjqpMqyENnno", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -208,16 +209,16 @@ public async Task ListTransfers10() { try { Request.ListTransfers request = new Request.ListTransfers() { - ShopId = "75bef93f-7005-4ce5-9d36-bc5f52ee8074", - ShopName = "0SO07EXHC5hQ61pWDcVyEH0QvPCR5IiYZhX71qxxCDFjWtGssb86D9XZfo8j2fPJCGzVYdohDRxcepsSsdecspEcH6zAIM8ju98Xf3eDqYA5vYg7TRPpd99WNI7yrXSKnnTIb76zTEtm8AaIiuGx9L9HalOMU5vigXX7Icn5jXA5QxJPbbGkUILhTXtRtmknLVk7hQOvzRC9zFhAU2LnJOGL09rrRBaBOdWWGJsxAr", - CustomerId = "ecf1ee67-a619-43a3-8926-165e06407c75", - CustomerName = "mMVdl31leH5Dl7ZUHzS51rJLdw2n2tQfnXr078yWrpzKRIJrBD5D7CpKjeG53Xpalhw5eupOSaoLetupiLJGKA08kULtDXm7mGq20CccqYOFtqhMLy1fSr", - TransactionId = "2b1ca2cf-2e83-413b-a711-2207d10f2627", - PrivateMoneyId = "4df4117e-0612-4887-897e-e12b4b8efaa6", + ShopId = "eaabfe74-0124-461b-8acb-a74ef40db4a5", + ShopName = "2DvQSu06FE8juzeNINZktFZU0JpHpSrpNbF8O3WzYFSGY9bWV5jbNBEz14f9BIpTXI2luGWaGy1CoC", + CustomerId = "7cd2c5aa-6d59-462f-afd9-e01a7bbac46d", + CustomerName = "aLr1BLYdgsrsB", + TransactionId = "d7c3650e-903c-4a37-8ebb-b46eb003dee6", + PrivateMoneyId = "d089a704-45b3-4280-bab7-60a75789eafa", IsModified = false, - TransactionTypes = new string[]{}, - TransferTypes = new string[]{"payment", "coupon"}, - Description = "mwTeB7HbtOFrcDL7mosyloW0gLyNig5qU771SYwG9bLFfHIbs98VpOgmc8pS7WZiumuB2TNJcJGvSmksA1MuW1A79SIV", + TransactionTypes = new string[]{"payment"}, + TransferTypes = new string[]{"topup", "campaign", "payment", "exchange", "transfer", "expire", "coupon"}, + Description = "YQAtf2GPfHYeeJWiJLn1TOWVNqKCYgaN6maSZWJn127yVjYZzSkjksojB4PnV9sBfF1BkHf1A87wLQ9bOIRS2WYI5ck8HRSP5FHw4UX4tGWi4N1WpwhPzDe8V1DYdcKn6nAl4cEX71br7jv7EDkwXN76HyKk1SGbd2fzw9nBiKXYeHN7C4", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -232,17 +233,17 @@ public async Task ListTransfers11() { try { Request.ListTransfers request = new Request.ListTransfers() { - PerPage = 1567, - ShopId = "8790a206-12be-4cab-9134-6ca74327ccd1", - ShopName = "caCTIuwp4PaSBE0QhobjzNQVW3hP0Ve0rN3Em7q1SjNjatjjDZX7RIKgDX3b9oA142xLkpis0qy5MfISyoLqEQKhMnAGBrL3KeptreugpuZPDhn3kvKQdinTisU7JGahMN0pspm5VBpWaMfH3OlTb5uoxVylmhf3ESdF0EHZGgpE19g89rUgV81h6fR4XXAReVSL8MjPf2nDJncUb7prKqWXHoSFTkZLdy8B9WWqNrXVXI1wRTqwqz", - CustomerId = "6b7b7356-1686-403c-bf24-b9bb6f2d752c", - CustomerName = "sahBGWwps3iARDJTRZkOOEQFC19Wtss23YjQBhHozeYJjV02y90GWowMI3ASCsApxBJptaJJRDQ6YTYkiFEIISprQ3cmpI6bh8YrVsWGSghDCw1Un7nnaTSFczRArCskatgTSAk3a", - TransactionId = "d27cdc88-5538-4389-9fad-97206d021994", - PrivateMoneyId = "eccd10e0-4ed4-40e3-88d4-9db09a3600a5", - IsModified = true, - TransactionTypes = new string[]{"transfer", "exchange", "topup", "payment"}, - TransferTypes = new string[]{"topup", "transfer", "payment", "coupon", "campaign", "exchange"}, - Description = "vEGRwH1gqt79bzapcrIrLur4lrAgRY4qmYCDpX8Ny7Ex4zLyYmVuuwRZjnfSOf90IL", + PerPage = 2829, + ShopId = "96eee591-12e4-414f-8d68-9f3ed087ec07", + ShopName = "cXyEVzhZku2OJwUM0ktk1yse4CdNhZgpKbkXWC5tLFNUhqVPCyC44juCu9OYkti8QhcNElbkx4K7ompotaJBLyz8KN17fLxPU1GvU5oJnH6hOfBgmDSuxOmphkziTG6p4HsLeIcNrFvlQBIX1JBgnrD1yLFlL5k", + CustomerId = "bf8ef162-059c-4ae7-b39c-c69deccaaa20", + CustomerName = "6xUgxf5sOofYseOtl3ilNOPpyIVjtUkLTSkOKux630Id9YuKsTGECVvJsAnqjel2la3rWWdK2ybDtXJiikZzBktm983ksDdKfbC96DBMvuC0QTfx8l2ZZBjyQqeO19KhFrkxiVRAQ6FFjz1wnjIRjO9MofqJJncHBCR1qP1zId4mLJCzHpOgkhaasWI8E", + TransactionId = "83ad0ffb-f84c-4271-8af7-c2521fe0bf9f", + PrivateMoneyId = "27f0b241-f8a9-459a-b6b2-fadf5a380e47", + IsModified = false, + TransactionTypes = new string[]{}, + TransferTypes = new string[]{"cashback"}, + Description = "V7JprfFD47gNL9WM6cSeojzOZZrLxO3x6r1ViuOnspa8l8OxqMpLrB8ZQmhXH", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -257,18 +258,18 @@ public async Task ListTransfers12() { try { Request.ListTransfers request = new Request.ListTransfers() { - Page = 1129, - PerPage = 6706, - ShopId = "734ec046-c66e-47bd-8586-e53b5f3a5494", - ShopName = "5pCv1ztILSktq1cNxb1w0fAXCRcSE6z5QHSLVITcWyXkWwNeThLpKI1N6RIMY7t0u9TuR54ZsbCHGDImjW34z4jE8W9hhkpYWEzZLn5uyvbNkfkqdGOYba42tK1ETZVrimXQx2toEzw7Z1gM6fgx4uEjyIUvTVKqmlOa23scUcryj4GBWTbDzAVeKXVTyNRuvNAUp6ljdawfubjQ03lDRu1dHypEu4pqRk9KXyywxfAsvQQw8eNXwtP", - CustomerId = "6385eb40-9ae6-4027-9f3e-31cbdf6f8c88", - CustomerName = "W4UwDxtqXzHNdytk1inQrWiktMK0FHLyLnvzTdFf0Y1JODoBhEEJFs7RURiJHf6mnglgKA3t551AWYy2EKxgIvudVQKM3ivlyVYA6fe68jtm2G7nC3SW8MPeFKTYT7eEYLwvHQFKDImV0W8uMWRziTXMumFeaEHdh8PePoMZwnAEmuUL6pb761IWS7zT3jmF3X", - TransactionId = "3caba7be-3fcd-4c7a-8067-754b559c1f44", - PrivateMoneyId = "aeaf25be-9b4b-4bad-8d4f-262cf2905bb5", + Page = 422, + PerPage = 2707, + ShopId = "00147a8d-9ec7-470a-937d-a1238f05ec2d", + ShopName = "gVcs3OQMdHqZLlv01wGqOn2jIsFsWbo7bpQq9anT6PszkN335U1t4DYsuiE88p3Hog0k8dxuKgCFI0Qv1brn8AT", + CustomerId = "ca6fa587-123a-4714-8dd4-7cce4af7062d", + CustomerName = "MEyVApkaDeYuOtBoCZgc4gwc8RSE7B5wsqfAkho5yO5EQGpb9AHk6UF1UjWUyw97H5Wi0UlM5hWRop", + TransactionId = "741cd606-76bf-479d-9571-af064bc2b40f", + PrivateMoneyId = "57f2bbb8-eb11-4f66-909b-e86d7c26c40f", IsModified = false, - TransactionTypes = new string[]{"exchange"}, - TransferTypes = new string[]{"campaign", "coupon"}, - Description = "MF41dYUnemzRdROKbGph7rDrumGN6tQ3vZwFKRF7w7plclcWB9bNRwQ0LABzLS5AginlSJbgCOpN21EzYv53e8C68gL6nh3hboA1VaXQqYz47H8v5OYX2Bb7kgjpYtpWxkJ26TN1VktFjJy7P", + TransactionTypes = new string[]{"exchange", "payment"}, + TransferTypes = new string[]{"expire", "transfer", "topup", "exchange", "cashback", "campaign"}, + Description = "QIEgbGEOQG1PZp7fjd91zgh1RHHtL55R7YEprCJ0U4QnLZWmGvTqLQwaZ9vOnv67spoRoPKUgWvYVa3Gv9xbfzvgScohGvfvszFZKZ0fsirdyb8N5N4uLXeppDXZ9aq2pYugtiiL7qWoYElTKmZkEzC", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -283,19 +284,19 @@ public async Task ListTransfers13() { try { Request.ListTransfers request = new Request.ListTransfers() { - To = "2019-01-09T15:47:03.000000+09:00", - Page = 5725, - PerPage = 5685, - ShopId = "38473e13-0853-4862-8b6b-e46feb7e297a", - ShopName = "4u4vqNtkYjPXUyJ1V0r5CHRNT2ecfLdc33OSn94wpSCBGnb27KI1Ko9Ro9P2UOPHKcZd7kJ0a09BOfpTrIxahzBDxgf0eAPjokEVHRFLghiMn2sJjV2bGnLruRc9c27Gp", - CustomerId = "483a2104-49f5-4e1f-b769-f65798fdfa62", - CustomerName = "08UbIXfaz", - TransactionId = "06d32ec9-e589-4e9a-976f-c3e74df9fa6a", - PrivateMoneyId = "3cdf125c-9e64-4da0-a1dc-3d782f481b9b", - IsModified = false, - TransactionTypes = new string[]{}, - TransferTypes = new string[]{"campaign", "payment"}, - Description = "phEzx62f8FNzaDel7ro4JT6XY3Y33ek4ahxmsrZJPb5B1K9ZLJjlQzrcG4cFx990D5go4dBLdUCSZVd4cTqnNfSRiXLw6IXx", + To = "2018-11-17T14:56:40.000000+09:00", + Page = 1116, + PerPage = 8055, + ShopId = "e6903e09-1237-464f-8b55-67616fca7aa9", + ShopName = "NeEnF41oUMWRj1sxtSyQgT1GkRhboXHY39x3Xs6KbKOjUQYLsphxNcJXceDU70KRGU02ETtMe3p5BruF5QOJx8zwWTQtwhgEUQrpqVtFI20RqU84wWVej7KjR7PO79YOuc2btzI2HvKaIy1dRKuzOlLMmdBSZr220xtZpZdQ9ssluYJHAlylPpV6x", + CustomerId = "2c8cd9d7-1d78-4523-b437-a003423a4507", + CustomerName = "2oLFlgp2lLhVbHghg4lZSVxXqYiDQPFv2xIXmI4PlPvyiodipyOhBLvJd18F7msVClYIZ6Bq4ZCm153pAwidsKM1ZphpLhv7NIoqmlJ", + TransactionId = "3ce2d5af-dadf-48bb-b0fa-8b4bf409254f", + PrivateMoneyId = "60d2eede-8926-459c-8d0f-7f59d5c63540", + IsModified = true, + TransactionTypes = new string[]{"cashback", "transfer", "exchange", "expire"}, + TransferTypes = new string[]{"cashback", "expire", "campaign", "coupon", "transfer", "exchange", "topup", "payment"}, + Description = "HcZXN3Xa70o7nFXURkjCcagg1x0DCy4shXKR7nTWCyIt3Gr6ubUQRiycmsaOa8T2aG0PP6tn", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -310,20 +311,20 @@ public async Task ListTransfers14() { try { Request.ListTransfers request = new Request.ListTransfers() { - From = "2019-08-14T09:14:35.000000+09:00", - To = "2021-03-26T06:55:36.000000+09:00", - Page = 1845, - PerPage = 3344, - ShopId = "5c103d4e-0833-4ae0-a258-eb5c8fbae437", - ShopName = "yEerLNEKMYsRf9vriYiP8HndtLKgFWIeB413C8zcpa0a0ipuLt3", - CustomerId = "ab504349-7dd1-464b-9151-b9010663148b", - CustomerName = "b6fikVg8U3XBigR3jya01cL7edhmrVi5NIsblUeDquiQL8YRreNoLAWMJdywYSICtYcbHl2ktF16gpa54attROZcBbejZS9wdnnNKINI7vj8qEDPsdJ8JkL6K4fbUtzmymsdzvhUXmrc210VozYCz4wR9Gfv1ooHMcqzJF0zVNZ8zHF5mnetJol0g7uhhZVwBBSB9NQuG", - TransactionId = "3b92770b-6b3c-457f-bb09-158719436b14", - PrivateMoneyId = "ef847494-d531-4dae-b9b8-d90ebeae6aef", + From = "2021-04-22T01:04:24.000000+09:00", + To = "2017-11-13T03:24:46.000000+09:00", + Page = 4208, + PerPage = 8852, + ShopId = "41d52a55-b7c9-4890-8c0e-d04fd5cc7292", + ShopName = "zvfJbTrh0kbVP56HQVtzlq6MKoBezSZGJZ1h8km3mkAPAZ0UMnnwlo100h7H4BT2IdLeJZDTCEki4ZW2q7YUbIlt759XkPd0Pd9Lm5F7XmpoqfPmIraGVhsLJiqbQ3MQR9CltXlG6ahNcft22PrlsKWxGtQj4OhVmQAfFvVtR4Fr5En7ms3KrOq6LmEP7tafjyhKgvwh227cUJMuQ1t83oitBAmKCKeNp7Z6KeHafo", + CustomerId = "12049a5c-b34f-4405-9d4b-aed9c85cc8a9", + CustomerName = "Us7zf9dIsiva1vYlz4sIXfB3ep9eHnNy54z9YZjsWtY1WGlubcf8poH65gFI1eD4xOb3KkBBLymzX1iKABzsalQh9et3sJPwGPZVdfeHb6D60qrRKjcydAgQf1kjgylUDTK4jhJH0jAjNW1ZH6MoDDkoySCPKncEWYebt4RUGRqT3wcuceySCabxrgTXSxZbg1Ud9jBS9CQqv6T7eIQXHJd8SnpNPnO39WNWvjXlHUhCIHkbLQ7KL6", + TransactionId = "af6c81bf-a4fd-49f9-b353-8ae4de8ccc6f", + PrivateMoneyId = "60871278-c794-44bb-a416-a22ee5d920ee", IsModified = false, - TransactionTypes = new string[]{}, - TransferTypes = new string[]{"payment"}, - Description = "Cptr8X3OQSs9cvMVMzYpfEHHq4AVCPhpFJVl", + TransactionTypes = new string[]{"payment"}, + TransferTypes = new string[]{"campaign", "cashback", "coupon", "transfer", "payment"}, + Description = "rmRY7bQCW9sPYWAKIaPAnlgG8mho7qKjeP1Vs1el3tVDmtz0qcHqLIsXtLIzc5kRp3WnRoU2x23XKfAMBShU6I6qbRRo0KsKQjbIFpDLYbMMvlh9JCT1xGcQLRIyKzcfWhCzi1Z89pSvPCqCpyLyZ", }; Response.PaginatedTransfers response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestListUserAccounts.cs b/src/PokepayPartnerCsharpSdk.Test/TestListUserAccounts.cs index 0e149a7..2784fa5 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestListUserAccounts.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestListUserAccounts.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -26,7 +27,42 @@ public async Task ListUserAccounts0() Request.ListUserAccounts request = new Request.ListUserAccounts( "f7badafa-54a1-4511-b337-e4aa1c1fe652" ); - Response.PaginatedAccounts response = await request.Send(client); + Response.PaginatedAccountDetails response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListUserAccounts1() + { + try { + Request.ListUserAccounts request = new Request.ListUserAccounts( + "f7badafa-54a1-4511-b337-e4aa1c1fe652" + ) { + PerPage = 5145, + }; + Response.PaginatedAccountDetails response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task ListUserAccounts2() + { + try { + Request.ListUserAccounts request = new Request.ListUserAccounts( + "f7badafa-54a1-4511-b337-e4aa1c1fe652" + ) { + Page = 7996, + PerPage = 3122, + }; + Response.PaginatedAccountDetails response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestRefundExternalTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestRefundExternalTransaction.cs new file mode 100644 index 0000000..4ed1c94 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestRefundExternalTransaction.cs @@ -0,0 +1,56 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestRefundExternalTransaction + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task RefundExternalTransaction0() + { + try { + Request.RefundExternalTransaction request = new Request.RefundExternalTransaction( + "ab504349-7dd1-464b-9151-b9010663148b" + ); + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task RefundExternalTransaction1() + { + try { + Request.RefundExternalTransaction request = new Request.RefundExternalTransaction( + "ab504349-7dd1-464b-9151-b9010663148b" + ) { + Description = "6fikVg8U3XBigR3jya01cL7edhmrVi5NIsblUeDquiQL8YRreNoLAWMJdywYSICtYcbHl2ktF16gpa54attROZcBbejZS9wdnnN", + }; + Response.ExternalTransaction response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestRefundTransaction.cs b/src/PokepayPartnerCsharpSdk.Test/TestRefundTransaction.cs index 97075d6..1dc422a 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestRefundTransaction.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestRefundTransaction.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,9 +25,9 @@ public async Task RefundTransaction0() { try { Request.RefundTransaction request = new Request.RefundTransaction( - "0eb2777e-c829-4aa6-a0d6-13621cb88acc" + "62c64955-3ee2-428f-8918-7958e6f8ede6" ); - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); @@ -39,11 +40,11 @@ public async Task RefundTransaction1() { try { Request.RefundTransaction request = new Request.RefundTransaction( - "0eb2777e-c829-4aa6-a0d6-13621cb88acc" + "62c64955-3ee2-428f-8918-7958e6f8ede6" ) { - Description = "VJ59qzi8HFxZtC5ypm8TU2Y6m10oazOnSDRVBADkHpYoJtK8deELoxPb8vCqW8ZrqfNGAkbzmAIScfq8JbwsUjFhr3NwoEyag2SfuJiolnAr0O5BazmKqHUlvI3TLRDU2wR06BrqE", + Description = "zIWogjdxJNEfM7ZphEzx62f8FNzaDel7ro4JT6XY3Y33ek4ahxmsrZJPb5B1K9ZLJjlQzrcG4cFx990D5go4dBLdUCSZVd4cTq", }; - Response.Transaction response = await request.Send(client); + Response.TransactionDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); } catch (HttpRequestException e) { Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestSendEcho.cs b/src/PokepayPartnerCsharpSdk.Test/TestSendEcho.cs index a0c9037..8aa1a7d 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestSendEcho.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestSendEcho.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; diff --git a/src/PokepayPartnerCsharpSdk.Test/TestUpdateAccount.cs b/src/PokepayPartnerCsharpSdk.Test/TestUpdateAccount.cs index 4117950..50c42e1 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestUpdateAccount.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestUpdateAccount.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task UpdateAccount0() { try { Request.UpdateAccount request = new Request.UpdateAccount( - "1cca797a-a4ae-4807-a9ad-4bab80f00988" + "553fd4da-7231-4218-aeb3-2d714f66622b" ); Response.AccountDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,46 @@ public async Task UpdateAccount1() { try { Request.UpdateAccount request = new Request.UpdateAccount( - "1cca797a-a4ae-4807-a9ad-4bab80f00988" + "553fd4da-7231-4218-aeb3-2d714f66622b" ) { - IsSuspended = true, + CanTransferTopup = false, + }; + Response.AccountDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateAccount2() + { + try { + Request.UpdateAccount request = new Request.UpdateAccount( + "553fd4da-7231-4218-aeb3-2d714f66622b" + ) { + Status = "pre-closed", + CanTransferTopup = true, + }; + Response.AccountDetail response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateAccount3() + { + try { + Request.UpdateAccount request = new Request.UpdateAccount( + "553fd4da-7231-4218-aeb3-2d714f66622b" + ) { + IsSuspended = false, + Status = "active", + CanTransferTopup = false, }; Response.AccountDetail response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestUpdateBill.cs b/src/PokepayPartnerCsharpSdk.Test/TestUpdateBill.cs index 26e1678..252896f 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestUpdateBill.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestUpdateBill.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task UpdateBill0() { try { Request.UpdateBill request = new Request.UpdateBill( - "f74385dc-54b9-4a04-b397-68b535a93439" + "011b504d-9950-476f-89b5-74640faf5c82" ); Response.Bill response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,7 +40,7 @@ public async Task UpdateBill1() { try { Request.UpdateBill request = new Request.UpdateBill( - "f74385dc-54b9-4a04-b397-68b535a93439" + "011b504d-9950-476f-89b5-74640faf5c82" ) { IsDisabled = false, }; @@ -56,9 +57,9 @@ public async Task UpdateBill2() { try { Request.UpdateBill request = new Request.UpdateBill( - "f74385dc-54b9-4a04-b397-68b535a93439" + "011b504d-9950-476f-89b5-74640faf5c82" ) { - Description = "IWGujcTx", + Description = "tAEAC8MN1MIRbysguh0xXqdkQK8VGfHRzulBqoPAVuBC2EUluqb81O3ZagKE8LcCa8bz2nHShe5EoHVudmx1iMacSt3whWHQ5cbR62Eyf", IsDisabled = true, }; Response.Bill response = await request.Send(client); @@ -74,11 +75,11 @@ public async Task UpdateBill3() { try { Request.UpdateBill request = new Request.UpdateBill( - "f74385dc-54b9-4a04-b397-68b535a93439" + "011b504d-9950-476f-89b5-74640faf5c82" ) { - Amount = 7494.0, - Description = "XyLyMOsteVH8YLvoUoraYyVUvoHuSd144X7ZEq8UGlMat7Q5BMcC1v73v60y8DMLWrlnr061xWZsz1ogogHitDMic7XGDhIwo", - IsDisabled = false, + Amount = 2605.0, + Description = "yRxoXmZ8au8D4esSHy55WYfHfvN0QEBe9OUmuQoNyAxdhT65YfaNVM2xjqlPxxy8RqwFWTQ1hvVt9bN2zIxNZx4eE9mHPjq6XCvYjxbcuNA5AOQHru6gAXocPu4UpOUbFxl1xg8SX1voG8Gydqo4fQ7D47J36mgyKf2pL", + IsDisabled = true, }; Response.Bill response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestUpdateCampaign.cs b/src/PokepayPartnerCsharpSdk.Test/TestUpdateCampaign.cs new file mode 100644 index 0000000..58bbb88 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestUpdateCampaign.cs @@ -0,0 +1,464 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestUpdateCampaign + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task UpdateCampaign0() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ); + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign1() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + MinimumNumberForCombinationPurchase = 4756, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign2() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + ApplicableShopIds = new string[]{"63ab7db0-4204-4361-bb8d-ac580f80fc8d", "0499c1bb-daed-45ec-b0c9-593841d733be", "dba47b95-36aa-447d-8cc1-11b74ac5a81f", "6a684d73-8150-4f8a-9978-efb7f16ca0cb", "8b5dc11f-fb92-499b-9ed7-afba931d45f3", "c20a257b-1ab9-4b47-b266-b3afeccdf390", "f0d1576b-9ce3-4ec7-86ab-4200d1d03df8", "08c6b290-e209-4b6c-abbf-6f1524da51d4", "adad4ea4-c707-4497-855b-44592ce8556a"}, + MinimumNumberForCombinationPurchase = 25, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign3() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"17742386-a306-4ee7-a9d0-d06c347a9378", "8b76b58b-f7ee-43fa-b066-5d5ec1e67222", "18693239-9cd8-4604-afa3-44e302e79197"}, + MinimumNumberForCombinationPurchase = 7644, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign4() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + ApplicableDaysOfWeek = new int[]{0, 4, 0, 1, 0, 2, 0, 0}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"b597ee0b-80f1-4a99-a016-afcd1d416a8a", "ede34d20-fb54-4c77-9b8b-91b9d7f5cf9c", "1123f743-749d-492f-9dc7-bb4d450967ab", "bed26a85-1407-4606-94f2-9570372a711d", "ef5e3775-7a70-453e-ae5a-48a61252b617", "107b8950-7640-4733-ae74-6b2efff632bb", "18996458-af4c-4ac7-8ca3-572d287b3d1f", "ed2cd0e4-8820-4ac9-a0b4-0b42e1ca309e", "89fafb2c-b9a4-4751-a5cd-41cb1fe66b4e"}, + MinimumNumberForCombinationPurchase = 8427, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign5() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{0, 0, 1, 3}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{}, + MinimumNumberForCombinationPurchase = 2679, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign6() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{4, 4, 4, 2, 1, 0, 1}, + ApplicableTimeRanges = new object[]{}, + ApplicableShopIds = new string[]{"d822e189-3f66-4b89-8155-2b2322643c75", "02f06147-36a6-4e5d-82c8-808837b8b755", "fea8c76e-72c3-4795-8ef6-2de3ddbb0889", "37ce9234-9414-4441-a935-79c8bef181ec", "b56cc10c-6643-4c6f-bc12-95b2a7aa0640", "968f0c24-7261-4237-8f04-73bc8042edec", "497dc06c-9fa2-47be-9f55-f03d1c08b487", "10b1289b-08ff-416c-8d3e-ed4fa7004cc3", "ecbd2b9e-4f0e-4f47-a3a1-73599f7c7761"}, + MinimumNumberForCombinationPurchase = 8433, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign7() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{1, 4, 1, 5, 0, 3, 4, 3}, + ApplicableTimeRanges = new object[]{}, + ApplicableShopIds = new string[]{"b25b5288-5bf4-436f-8f59-9a168abe990f"}, + MinimumNumberForCombinationPurchase = 8972, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign8() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + IsExclusive = false, + Subject = "all", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{0, 0, 6, 0}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{}, + MinimumNumberForCombinationPurchase = 662, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign9() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + PointExpiresInDays = 5273, + IsExclusive = false, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{3, 3, 3, 0, 1}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"5a668aaf-bcea-4ce7-af63-f81907971ef5", "4eb80c75-95d7-48d3-b5f5-3d2ca69e0fd0", "92a363af-de84-4c37-b15b-b4041567490a", "c254a1a6-7a24-4e5d-9003-ced8ababa9dc", "6d7dc249-f508-4390-8484-5ad6873b0ffc", "2f299f3a-50d9-42a1-9cc0-33de36a863fa", "000c7587-8288-434e-aace-177bdde60311", "a1e222c0-c429-4969-959a-859300993200", "ff59a54c-258a-40a9-8612-3657dd2f0421"}, + MinimumNumberForCombinationPurchase = 9, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign10() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + PointExpiresAt = "2021-05-27T23:46:14.000000+09:00", + PointExpiresInDays = 3990, + IsExclusive = true, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{5, 4, 5, 5, 0, 6, 4}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"ff25d5f0-1095-44ac-b9a3-9b23b6ecc635", "46acdf10-6790-4860-bc6f-5e1a8e9abf60", "6a507c37-e8f2-4f45-8eb4-96e530305e8e", "79ecc92d-5669-4d08-849a-b271139b7296", "bd2d2ed9-504a-4f56-85a1-d4e7d6ed69b5", "69038f7d-220f-4e55-9a96-4aaa8af203cf", "38f9b0dd-975b-4b06-8e3f-d325d6c81668", "91b1e54a-982e-4bbd-813e-c5dd2d40effe", "3fe30ce2-edbb-4fc8-b708-329ff7fc4440", "9c7333ce-285d-4f4c-a7f5-a18b8557b13d"}, + MinimumNumberForCombinationPurchase = 3919, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign11() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + Status = "enabled", + PointExpiresAt = "2015-12-02T14:06:36.000000+09:00", + PointExpiresInDays = 4474, + IsExclusive = false, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{1, 1, 2, 6, 5}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"31309e6a-c33b-49c1-bddd-c98771d13ccb", "1b0968d4-959c-4b9d-bd7d-adaae720da7a", "e5d668e4-2f51-4c09-945c-c88f44ccca2e", "afd9061b-a6b2-476c-acdf-0cc794cee6e3", "0b5f72d8-ca6c-4cdc-b52c-dd80d7fb9fc3", "d187513e-bff7-421c-8ab9-7161402706a7", "712409e8-1bfd-4d22-9df4-ba5337440cc8", "2078c876-7796-4520-9cd7-ba5bbbf0cbc8", "0cbf49f8-5bfb-4444-9b9a-d9aaee709de2"}, + MinimumNumberForCombinationPurchase = 1654, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign12() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + Description = "GOKxoKM3BkiQ5JCNLUQPpDOoGNkBoKxTvABwe33UWeSzKCZwv4", + Status = "enabled", + PointExpiresAt = "2017-02-27T04:35:29.000000+09:00", + PointExpiresInDays = 8070, + IsExclusive = true, + Subject = "all", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{0, 1, 4, 5, 3, 5, 4, 2, 0}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"db6515ce-0065-4427-8d41-6a92c43235c3", "38e22b49-3c74-4eed-bf4f-6f6b996649d9"}, + MinimumNumberForCombinationPurchase = 9093, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign13() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + Event = "external-transaction", + Description = "1pUONfZUthj8CTdPwk2g7DYhFuXWtax2gH7mosTYAgSjd1Lu4N1G4DllEfWLsx2f1PjIk5LFEcZYZR1K1ULgGU5oSrsDCn36n92LJoBnxVWA0Bmx0P3sSh52djDx2E8q2Tl06IV", + Status = "enabled", + PointExpiresAt = "2017-12-18T02:05:30.000000+09:00", + PointExpiresInDays = 5142, + IsExclusive = false, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{5, 5, 2, 1, 4, 1, 3, 3, 2, 4}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{}, + MinimumNumberForCombinationPurchase = 9143, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign14() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + Priority = 253, + Event = "payment", + Description = "D4jd9Fi73fT2ekfbMypSoZArmvOOmVqy7LHITpCScM5po6zQrUB5yHtoGfycJYa2GIKQCGBFwcqnjKtXS5ctb0sUDamQiJFavfIlsQjs1Uxv98uoxa9cfqdBZBSSyuPsLgc14jRH1daAJWkWpeGVt7BTtK3VwbUSgXIGfDPEPwHED0KtmDzxLUbUeg", + Status = "disabled", + PointExpiresAt = "2025-03-30T18:06:33.000000+09:00", + PointExpiresInDays = 7177, + IsExclusive = false, + Subject = "all", + AmountBasedPointRules = new object[]{}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{5, 3, 5, 1, 1, 5}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"49b62e55-084b-4ce8-899d-19fc3b0bbf21", "08452bf8-5b4c-45fd-9065-b80dc4b5a131", "2b8cd094-197f-40c6-8d48-17ef25d6c568", "54a3bfb3-4c30-4334-b1e3-77e03818377a", "2abe7376-5b55-4937-b47c-2a69ec5e4ad4", "b56f1029-3e14-4e47-abce-7895c7242b83", "13a9ed59-c901-4484-977e-24eceb302044"}, + MinimumNumberForCombinationPurchase = 4924, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign15() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + EndsAt = "2015-10-15T20:27:09.000000+09:00", + Priority = 1889, + Event = "external-transaction", + Description = "Mps1HN2Oi8GzWre6yIHCge3KvTMWtvAOdqc6t46b4EgFIpDVk2sqQhlAUNF0Kr6ekdB7WSGl", + Status = "disabled", + PointExpiresAt = "2021-11-27T23:42:51.000000+09:00", + PointExpiresInDays = 5597, + IsExclusive = true, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{1, 2, 2, 6, 5, 6, 6, 0, 1, 5}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"25b9c896-3166-4f7a-a74d-eed3c6dc0737", "4494f793-e395-4fde-8441-c1182e51f60f", "ae7a1112-6778-4dd2-969a-2f19ffc5ce7d", "40250498-6758-456a-8181-d61c4dee57f0", "43e1b2af-fd6f-41d9-8feb-8986254dad4c", "3551c959-0c89-40e2-9d4a-00cd949dd834", "30a5fe9c-04b6-4918-9947-0eae24a41012", "d652a5a0-58dd-4b4b-84ca-102199823e25"}, + MinimumNumberForCombinationPurchase = 1304, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign16() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + StartsAt = "2024-10-22T15:28:34.000000+09:00", + EndsAt = "2018-03-03T10:13:06.000000+09:00", + Priority = 6557, + Event = "external-transaction", + Description = "tfUdHVcso", + Status = "disabled", + PointExpiresAt = "2022-10-04T08:15:00.000000+09:00", + PointExpiresInDays = 6807, + IsExclusive = true, + Subject = "all", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{1, 2, 3, 6, 0, 3, 4, 2, 5}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}, new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"f93abace-e809-483f-92c4-d88173ca89d3", "670635eb-36a4-4952-b966-a9d7e78f9099", "a4f89b60-f14b-4e41-b86a-c98c69dc5424", "c36d46fc-11d1-4c88-97ea-798e105e3243", "68ec2842-b0b8-4492-9a1f-3140097e73ee", "af9522c6-e63f-4c2f-907c-1563c21e4c82", "3b5350f1-5912-48ed-8586-bca6c60bce98"}, + MinimumNumberForCombinationPurchase = 5711, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCampaign17() + { + try { + Request.UpdateCampaign request = new Request.UpdateCampaign( + "0292e4f0-7e8e-43cb-a782-75f43fe77c72" + ) { + Name = "fDor1z", + StartsAt = "2018-05-21T05:49:16.000000+09:00", + EndsAt = "2018-09-12T08:46:31.000000+09:00", + Priority = 6042, + Event = "external-transaction", + Description = "x3xZsR5bLJPhH3FEHzbfU4cD6smAeqngifjNikqDE3OudXpYhNwFWUAKOn", + Status = "disabled", + PointExpiresAt = "2024-02-13T07:04:20.000000+09:00", + PointExpiresInDays = 2543, + IsExclusive = true, + Subject = "money", + AmountBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"subject_more_than_or_equal",1000}, {"subject_less_than",5000}}}, + ProductBasedPointRules = new object[]{new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}, new Dictionary(){{"point_amount",5}, {"point_amount_unit","percent"}, {"product_code","4912345678904"}, {"is_multiply_by_count",true}, {"required_count",2}}}, + ApplicableDaysOfWeek = new int[]{}, + ApplicableTimeRanges = new object[]{new Dictionary(){{"from","12:00"}, {"to","23:59"}}}, + ApplicableShopIds = new string[]{"0dde3703-82ce-472d-8d51-f11f8aa8d80d", "2b90853c-dde2-4dc5-bd5e-a66ee96a3162", "bc779e2c-8ba7-4d7b-a04d-b0afb5e88356", "24e02593-fe11-48e4-a2e9-7c39a2bbc511", "7ab22680-df0e-493a-8735-a25dfe891b61", "544f4bc5-175b-462a-b371-cc340896a8a4", "f33f07e7-7754-4cce-b986-93266ae72633", "9a25d023-f4e7-4748-8aa2-44270277e741", "03f390aa-197c-483b-b19a-809924c73dc6"}, + MinimumNumberForCombinationPurchase = 4653, + }; + Response.Campaign response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestUpdateCashtray.cs b/src/PokepayPartnerCsharpSdk.Test/TestUpdateCashtray.cs index 2147071..7b9a992 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestUpdateCashtray.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestUpdateCashtray.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task UpdateCashtray0() { try { Request.UpdateCashtray request = new Request.UpdateCashtray( - "2fb52007-c055-4363-bbf2-3cbaf35659f5" + "04fa8406-5ac6-4203-98f1-d63f1d329980" ); Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task UpdateCashtray1() { try { Request.UpdateCashtray request = new Request.UpdateCashtray( - "2fb52007-c055-4363-bbf2-3cbaf35659f5" + "04fa8406-5ac6-4203-98f1-d63f1d329980" ) { - ExpiresIn = 8154, + ExpiresIn = 399, }; Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task UpdateCashtray2() { try { Request.UpdateCashtray request = new Request.UpdateCashtray( - "2fb52007-c055-4363-bbf2-3cbaf35659f5" + "04fa8406-5ac6-4203-98f1-d63f1d329980" ) { - Description = "P4H5cCw5ExNqh41OXXFwVmaHYw6oEFbK8qER1LlAIi5qYTqeIN9jftsBTkZDKCnQigIBcgyeHE0tecRrYBgXoYNaRDH3xa5ZXl3L94kmDiQZVmfdCV9wGJUROgp1VTNstKsbk2wvZcZmJCZwuee4w9Rkvag9C19xRl1IlJpGXqlhd5uwOg53j3Qic0iyKL", - ExpiresIn = 7844, + Description = "wAY75stQD6SAh41fZii84vybd1Jsf0jR3rzbwtxyn2FAh1zUedGEpNztrZH4AytTHxVvHVgjPvTnTRbAGxJFBzSBdN9r", + ExpiresIn = 8985, }; Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task UpdateCashtray3() { try { Request.UpdateCashtray request = new Request.UpdateCashtray( - "2fb52007-c055-4363-bbf2-3cbaf35659f5" + "04fa8406-5ac6-4203-98f1-d63f1d329980" ) { - Amount = 6023.0, - Description = "nZxaZi9iCa2kj9IDD4FLU", - ExpiresIn = 3878, + Amount = 9387.0, + Description = "Ml90EeuZgaP20pyyEjfyZn", + ExpiresIn = 3199, }; Response.Cashtray response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk.Test/TestUpdateCustomerAccount.cs b/src/PokepayPartnerCsharpSdk.Test/TestUpdateCustomerAccount.cs new file mode 100644 index 0000000..78fc848 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk.Test/TestUpdateCustomerAccount.cs @@ -0,0 +1,93 @@ +// DO NOT EDIT: File is generated by code generator. +using System; +using System.Net; +using System.Net.Http; +using NUnit.Framework; +using System.Threading.Tasks; +using System.Collections.Generic; + +using PokepayPartnerCsharpSdk; + +namespace PokepayPartnerCsharpSdk.Test +{ + public class TestUpdateCustomerAccount + { + private Client client; + + [OneTimeSetUp] + public void OneTimeSetup() + { + client = new Client("~/.pokepay/test-config.ini"); + } + + [Test] + public async Task UpdateCustomerAccount0() + { + try { + Request.UpdateCustomerAccount request = new Request.UpdateCustomerAccount( + "f39e0dc7-ebbf-4161-a34e-e312bce444b9" + ); + Response.AccountWithUser response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCustomerAccount1() + { + try { + Request.UpdateCustomerAccount request = new Request.UpdateCustomerAccount( + "f39e0dc7-ebbf-4161-a34e-e312bce444b9" + ) { + ExternalId = "eZjSIQORsTn19Lt83IRfp6apsZzw", + }; + Response.AccountWithUser response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCustomerAccount2() + { + try { + Request.UpdateCustomerAccount request = new Request.UpdateCustomerAccount( + "f39e0dc7-ebbf-4161-a34e-e312bce444b9" + ) { + AccountName = "Ugb2qqrLtRpMZnFJMuPuuYDxHZdnikAchiJbVP3ZTnJxIJTqpbj9hQa29LtqbzIUCtrgI5GH6", + ExternalId = "i2f3OojTDEk0fitYgK", + }; + Response.AccountWithUser response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + [Test] + public async Task UpdateCustomerAccount3() + { + try { + Request.UpdateCustomerAccount request = new Request.UpdateCustomerAccount( + "f39e0dc7-ebbf-4161-a34e-e312bce444b9" + ) { + Status = "suspended", + AccountName = "zfXu0N7ZPQ6Ey6Tu3B", + ExternalId = "U56A0DovC2AWlgsj8AO1bqHH9NHpqZwH1tkpyND", + }; + Response.AccountWithUser response = await request.Send(client); + Assert.NotNull(response, "Shouldn't be null at least"); + } catch (HttpRequestException e) { + Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); + Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); + } + } + + } +} diff --git a/src/PokepayPartnerCsharpSdk.Test/TestUpdateShop.cs b/src/PokepayPartnerCsharpSdk.Test/TestUpdateShop.cs index 0db1f4c..1602e61 100644 --- a/src/PokepayPartnerCsharpSdk.Test/TestUpdateShop.cs +++ b/src/PokepayPartnerCsharpSdk.Test/TestUpdateShop.cs @@ -4,6 +4,7 @@ using System.Net.Http; using NUnit.Framework; using System.Threading.Tasks; +using System.Collections.Generic; using PokepayPartnerCsharpSdk; @@ -24,7 +25,7 @@ public async Task UpdateShop0() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ); Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -39,9 +40,9 @@ public async Task UpdateShop1() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - CanTopupPrivateMoneyIds = new string[]{"d3301f2d-71ff-4eae-9349-40a6609bfaf9", "5f505541-8736-4941-bdfd-4c89bbe6d96f", "08b73f2b-782b-4ab8-9c3f-df7bbb8a1c3a", "04d8339c-0632-40b1-98c5-f23ec65ce703", "7ffd962d-3bdd-4a04-b535-970adf92c283", "1e2ee80a-7be8-4ce3-b239-7d8b4abd38fc", "6fd09e5d-b870-467f-a776-71aea637d91d", "b90a0efe-5d88-4b34-a0f3-2f5acac61bc2"}, + CanTopupPrivateMoneyIds = new string[]{"7ce7811e-1db8-458b-a320-4d026aa53e84", "062d3c3a-1429-4602-b36a-93a18ee414d3", "bd82a17f-57ac-40f9-ada9-4b1b54747b1a", "d74d7080-e539-478a-9080-d943136b2406", "13e8c54c-849e-44ea-ab71-5238cedf3179", "514f338c-0b6a-4c5f-aa5e-c97f00d22d78", "208ccdc9-9c24-486e-bf7d-af6ff9c3c6af", "c5682613-ccc2-416e-8a4c-c6563cea22f7", "7a805705-bfb5-498a-8a4e-269e46026078", "97a55001-a49c-42c8-90a2-a3b7f0ec90c3"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -56,10 +57,10 @@ public async Task UpdateShop2() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - PrivateMoneyIds = new string[]{"c745440d-0d8a-4793-99b5-28778d9bb58e", "35f3aca2-243d-4d41-9e34-d74f78d1e5e7", "6aff83b2-72ff-4698-83eb-fd9f9bb962e4", "32e616dc-7712-47c1-99cc-f9dbc403b1d6", "d8a16754-a81d-4003-b8bb-06882133c31a", "4fd5670f-b153-464f-b3e1-ef3df748833d", "bec4b37c-a98d-4c53-b31e-add5c5c62e6d", "65886f64-2c16-4b5e-99fb-6b8d8458ed96", "b76dc0b0-76a5-4743-8c9f-cae315705c66", "abbc3d97-d63f-4f1c-af21-3a5f8ddef3d5"}, - CanTopupPrivateMoneyIds = new string[]{"1dd9a7a2-f40b-4b53-892f-eae4d85eecad", "4b14cac5-8c4a-41cd-87fb-409953f2c323", "fcfd5891-195c-4ba9-b908-b42a9840ef80", "1f67e313-96b8-48fa-9402-f0dfb5decf1b", "a9ab9843-2b8d-4a40-b604-e82317f692ef", "2fd9a974-b893-4697-8c86-d67098605753"}, + PrivateMoneyIds = new string[]{"5a27a1c9-5a39-4dd9-a221-48b541d65790", "2ce967f4-eccf-4551-9a2a-b4b2f2f34471"}, + CanTopupPrivateMoneyIds = new string[]{"a64ae791-5f70-4db6-a58b-78425dda8190", "a5ea67ec-9421-42ef-829e-f570f3e68bf5", "22cb80ea-642b-4cce-ad99-874a8fa44713"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -74,11 +75,11 @@ public async Task UpdateShop3() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - ExternalId = "w3LnpbrPkZnN", - PrivateMoneyIds = new string[]{"b8ec109f-d0a5-4250-ac9b-3916e4c32796", "0ae15cac-29d7-47cf-8ce0-7cb523097e7b", "a1fa08b5-a711-4a55-b77e-47a1a2066044", "a9d0b953-cabd-4c66-85d9-71331aa2a04c", "204f8012-d1e7-4a3f-bed7-59b58514e04d", "1baab15e-26a6-4bb2-8920-4040dcdf26f6", "fe592ea4-eb52-47b5-9d3a-1e32d6b54e2d", "fa768c88-177b-49c3-a7c9-d3936996bcc2", "057f9ca7-2894-4cf9-a5b3-4b88829f8faf", "48df5765-4323-467b-87cc-9695b7f804a1"}, - CanTopupPrivateMoneyIds = new string[]{"e6b165f9-2a73-4ba9-b1b2-6a9c01fc4302", "7f829dc8-a02d-478b-8f2a-00fd0e92bb2b", "dea1b9ba-d3c8-4590-8483-ab8f3bdadd46", "9fd33d1b-9519-4646-a5f1-1a01de1d3c4c"}, + ExternalId = "uVKWvjUjC0", + PrivateMoneyIds = new string[]{"c64458af-0ab3-465d-9b86-90664eff11b2", "61154127-fe01-47cc-bdef-933913db0fce", "c898b0f1-236c-48d6-b6ae-0575cf9ae458", "ce5e100c-9da6-4abe-aaa0-abcd5c833634", "d3440c3e-a879-4645-b96b-2d6403e72a5b"}, + CanTopupPrivateMoneyIds = new string[]{"f924df37-7cec-4dd6-b65f-130165b1fd90", "1a190817-d11f-4151-8d5d-600d7d36c64b", "0a46d77c-4dde-466b-bc93-baa610954c7a", "0b38e436-5686-4ad2-bb9f-1b054eb4a1fb", "b3a403c5-f387-4b7a-af80-15490e3dccb7", "d72cc81f-c2e3-4eda-993d-ddfda395863a", "1097e857-3540-4b34-bfa9-cbe3c86e9ba7", "6049838d-0d97-4e0d-9b30-9499f0fed147"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -93,12 +94,12 @@ public async Task UpdateShop4() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - Email = "oUtYmfM0XL@YceQ.com", - ExternalId = "bY3jVYhbh4RW4SjcPHu2gI", - PrivateMoneyIds = new string[]{}, - CanTopupPrivateMoneyIds = new string[]{"f92ffa0f-4c48-4890-8490-636cb33c8493", "e8565392-e39f-4943-a7f8-80bcda9efed9", "ecd8ee6c-9196-4346-9a5a-251a00f8aa7a", "52f0a0c2-ca24-4575-a4c8-e21e57cf88da", "672f7509-2838-46f4-9e7e-b0eacdd5fcba", "29722373-da68-4600-be36-f93881d5edd3", "de2f5663-aadd-43fc-9a84-63aaaa05ebba"}, + Email = "yNh6EpQVqX@4KE4.com", + ExternalId = "5KR", + PrivateMoneyIds = new string[]{"92d773a5-54dc-463c-8478-0f0206ce2dbd", "1e073b53-d053-422d-bd70-cf8f465a56f0", "ed67b71c-8c56-4988-8f52-5799cb86822b"}, + CanTopupPrivateMoneyIds = new string[]{"dbf2f57b-6f4c-4a79-b650-325f782fdbcf"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -113,13 +114,13 @@ public async Task UpdateShop5() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - Tel = "049-05361", - Email = "9o0TcGJkIJ@gRMa.com", - ExternalId = "hTjY4B83KCbssdnciBK2yKUyBpazsFHLyP", - PrivateMoneyIds = new string[]{"3691a03d-81ef-4243-b12a-6cbfb7121957", "e7b8f193-1657-4af2-ba1d-e0e96c3d0912", "f0e284eb-73c8-4bb0-bf44-54f2dd789ea7", "d33a6b54-21a3-4be8-9f7c-88c95c430fa1", "4d759039-09ee-4664-8b09-78c3a33f61ff", "365cc841-a9d2-4158-87b9-67e907a125da", "7afd2ae8-1a80-458d-9549-3a776cc20ad5", "03c6943d-ba72-4973-9189-f0e0edffb40e"}, - CanTopupPrivateMoneyIds = new string[]{"fc8ecf55-c222-44e9-aa1f-7c0560e5390f", "483a3693-4126-495e-afb5-2d8f21d5b121", "37b9c735-fd91-4b3a-aee4-ddf97342d528", "4d9b993b-5709-4a3e-a9a0-3a8adc6a53c2", "cdbe40f8-8a58-46e2-8bd7-4859defd9e0d", "a227ea06-f8fd-433a-a8ac-e2f115b0c7c9", "d521ccd1-5163-4841-8426-de416244912e", "e649e923-9aca-421a-bce8-95d72ef834c6"}, + Tel = "038-87-5062", + Email = "7dHE8reh9b@3v7z.com", + ExternalId = "YS2", + PrivateMoneyIds = new string[]{"4d62e930-4525-40c5-870a-11f340449dbf", "3734f6a0-e7d0-4ed0-a207-a276f90d83a3", "2b1cd3d1-e2ba-4a76-83bb-ae2fb1519e18", "cd1f8e7c-84d9-4e6b-8150-5ac2f344eea9", "70b576ca-3c37-4a1a-b7a0-a8ed43d150e7", "8a00ce14-0d13-4c43-9e0e-203b19378957", "2f603e4e-67cb-429a-8450-e8a7b32cb4b1"}, + CanTopupPrivateMoneyIds = new string[]{}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -134,14 +135,14 @@ public async Task UpdateShop6() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - Address = "wASll2hGkEzja1NmQHCUATGGz590dtBhucZ4e0BzAWy80f2MmxJUnd92RrjDmsbpR1t9xme9U0GR2pRvNpULEoTr6H5p2Y5YBaOZdS1seolNILNbVpFGvZ3N4x3uv", - Tel = "04571208", - Email = "Ii4C82SzJJ@G4lO.com", - ExternalId = "DNS2Ij7U5b72UTWbjXGfzCm", - PrivateMoneyIds = new string[]{}, - CanTopupPrivateMoneyIds = new string[]{"f00f597d-de32-4c3f-9c0b-191ebc78a176", "64ec1ceb-f259-472b-ad86-b925c20f2b72", "55c31543-87f2-429b-977f-707e2e8182f7", "b0eff541-03b7-47c9-a2eb-e55c4be2b644", "fcbc166d-0cdf-40eb-bf27-5517899fa02d", "591f66b9-bf87-4ce1-9bbb-d2638e9443f2", "38929b0f-5afd-46fd-b874-20fdde07b2d8", "e08ed103-cb39-42fb-8a51-e614fa5782d3", "8325ccc8-e2f9-4169-862b-4f22fde3c66f", "bdcf9ef3-8ebd-42dc-8765-dea5d682c415"}, + Address = "enxAKZBD2FhNoFZKIbAgSoRCKxxDEWQZO9yz4Mc4BWxPS7UaVHpVi4pZYZOGKLSewvJuaN97ObUNQZ0A0Rwk2Z2omGatDjCcJfOMaGd4kHySUJYrKI48UyLazcdaqg9M9b56VUQzIG7Yr7fsBnFuG56tOVY8vi9Z9lrb", + Tel = "07-8431-6229", + Email = "dPS2DfLew9@jsvL.com", + ExternalId = "XjFRqAsdyU0EjzFGdoCEVoN09yrlyTlHcxkp", + PrivateMoneyIds = new string[]{"1e253ae8-b900-4364-8d69-ae1220adce4a", "c990d3af-79d7-482f-b35e-278ab6e04338"}, + CanTopupPrivateMoneyIds = new string[]{"f6294826-30a5-4b2d-9fa7-548ac8c250e5", "c1197029-5aef-4b41-b1f6-79678d085486", "0febff67-1e30-4488-b17a-305ac560f915"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -156,15 +157,15 @@ public async Task UpdateShop7() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - PostalCode = "880-9595", - Address = "K8GIOW0PGU45uzPdd0dJeNNvUC0bqs1h", - Tel = "0846-4950-984", - Email = "evbrAQGpnY@omE2.com", - ExternalId = "pD4cThkIOO2LW0e3G1sTmjjHcN57ZbAikJ2o", - PrivateMoneyIds = new string[]{}, - CanTopupPrivateMoneyIds = new string[]{"07b75d79-57e0-451b-8972-7031b8ea0f6a", "04bd31e1-acb3-479e-baf5-6b83d541de81", "35ee8012-226d-4e8a-b69e-fc1755f1f0e5", "5b13e937-8237-40bb-b11d-d96b06bc832e", "e11522d1-a837-489e-ada2-017c8d771777", "f0426010-b25a-4bee-8a66-79c7f926b4cd", "f9c2a0d1-ec61-43f3-8331-24fff9f37179"}, + PostalCode = "777-7247", + Address = "gWRTNwobRsB1baR1aePdc9fGH", + Tel = "03-452-017", + Email = "5Jr7zEeO7n@UDqx.com", + ExternalId = "j74j643AIOVakyq8QHWKNric3", + PrivateMoneyIds = new string[]{"98829d42-795e-4d7f-9fd1-afd942de89a8", "9aba5da3-35bb-4657-b34b-bd5bf85d005f", "b8cf7af4-4f8b-4276-ae78-f76f201e3428", "1ffb49fb-8f51-4dca-af1d-d905313401cc"}, + CanTopupPrivateMoneyIds = new string[]{}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); @@ -179,16 +180,16 @@ public async Task UpdateShop8() { try { Request.UpdateShop request = new Request.UpdateShop( - "3728d47f-c5f5-496a-a6ef-556538da78bc" + "319a0c01-8a60-4ee2-80b0-4ec9c89f47d9" ) { - Name = "b1Dq2UL9Kx0jYk7sZRicOTg23f5GXrX6ozTzm0HG0TosxKz4jitwHtujKhwCFGwiyv4vlRBRxfHZeKBVf4jVtecQNubIdHetIBPUrvpeN86f46tWgyM43AJZ0KTwWOYBSX4EzfsIiIDCSxoowqwobMRj4K8plKu", - PostalCode = "1646363", - Address = "KCXAkk07Q9YuV27x2ZZwJNPJ0aXH1uRWCYsw6VRBfXAF7xeoT0y6lNlDnKEOyMV89HUL5OwvTmfkSpdcLQvsJQRiuvWpRkphzntqbTr2vHF1iF0Y7dBxe8hiTzwkLtzBfAa7kaQm6vULSy1FKdTtu83N0tnRGbdpbMjOs6Ns", - Tel = "0521-29103", - Email = "IK7BQ6Amsw@dAM3.com", - ExternalId = "JrwVbs9pMx", - PrivateMoneyIds = new string[]{"ad6d4501-57cd-48c3-b4bf-ea6857fa1c8c", "6d131169-d3fd-4bf6-bbb1-8f24d91c78e1", "020de332-0745-4e16-85c8-cb469e4cd36d", "60840aae-a29b-4add-9177-b1345a296e4f", "8fa8a9ed-544a-47f3-9c58-76dcdf310baf", "1c8a9886-9e72-4f61-815e-cda7dcdf0fa7"}, - CanTopupPrivateMoneyIds = new string[]{"20394f08-06ec-4e69-a292-ffc5ce8c1aff", "61f66ac2-fc05-4b19-96bb-3fd07c1f73ed", "6b2148c8-827f-4572-88b7-a2b6ca4e4640", "942fa36f-d2fe-4501-971c-7c0f59c9ff88", "840dd463-4891-4073-b293-e10edbaab9a9", "68454c37-8cf9-47bf-9af0-1c884d4025bc", "72e1d49f-2574-4d77-94cf-66c92ac534a6"}, + Name = "loM94TQVFchkaVLnKXq1JcpZfZUH2UsKCxnRcuSoLNAly4QR5kzfucn7LZFZw", + PostalCode = "8958602", + Address = "JGwbFSZ2qU3L9frpqlrETgz3O9wlyQ0TWfR4Gx21zM7WIQGDsPsJyAShBlCJPjtVj6RA58jW2j8noWbhryHKQAP2bBeZkmIh2UeN7Z047tEp9MnaMKkPTTOh4KlFXKgtixsqVTYrrSHZ1a0tz4EzkuhUCHWp85qyAYWUJWst1yIlHOt0XiM6Qkur8SbZd3wcuCesxkTgeU", + Tel = "06419716", + Email = "L5t780R8L5@VrLx.com", + ExternalId = "zR", + PrivateMoneyIds = new string[]{"e0ab3283-3c51-4612-bc6c-7756cbf66c75", "ab66f78a-4d24-442f-b0dc-beac75d52dda", "f4e91560-95e4-44eb-adc8-9481ec8c27d7", "d0d0f59b-e927-4764-90dd-b5d5d648ee98", "0c428be9-6d00-408a-ba56-47acec9262bd", "60427415-8ac4-4daa-b1e5-8748ed87ee5e", "bf947585-3450-4006-a3d1-88d6bace351b", "7f990cfc-5274-4799-919d-702360279503", "e535e5ec-c34f-41ea-ba53-c51c3cf57fa9"}, + CanTopupPrivateMoneyIds = new string[]{"231178b3-8731-4c05-8d7f-01f8af007490", "321f9f15-5706-4b71-9bb8-1fd3fe26f421"}, }; Response.ShopWithAccounts response = await request.Send(client); Assert.NotNull(response, "Shouldn't be null at least"); diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs b/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs new file mode 100644 index 0000000..ffbebed --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs @@ -0,0 +1,46 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class CreateCampaign + { + public string Name { get; set; } + public string PrivateMoneyId { get; set; } + public string StartsAt { get; set; } + public string EndsAt { get; set; } + public int Priority { get; set; } + public string Event { get; set; } + public string BearPointShopId { get; set; } + public string Description { get; set; } + public string Status { get; set; } + public string PointExpiresAt { get; set; } + public int PointExpiresInDays { get; set; } + public bool IsExclusive { get; set; } + public string Subject { get; set; } + public object[] AmountBasedPointRules { get; set; } + public object[] ProductBasedPointRules { get; set; } + public int[] ApplicableDaysOfWeek { get; set; } + public object[] ApplicableTimeRanges { get; set; } + public string[] ApplicableShopIds { get; set; } + public int MinimumNumberForCombinationPurchase { get; set; } + public string DestPrivateMoneyId { get; set; } + + public CreateCampaign(string name, string privateMoneyId, string startsAt, string endsAt, int priority, string event) => + (Name, PrivateMoneyId, StartsAt, EndsAt, Priority, Event) = (name, privateMoneyId, startsAt, endsAt, priority, event); + + private string path { get { return "/campaigns"; } } + + private static readonly HttpMethod method = new HttpMethod("POST"); + + public async Task Send(Client client) { + string res = await client.Send(path, CreateCampaign.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateCpmTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreateCpmTransaction.cs new file mode 100644 index 0000000..007bcdf --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/CreateCpmTransaction.cs @@ -0,0 +1,33 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class CreateCpmTransaction + { + public string CpmToken { get; set; } + public string ShopId { get; set; } + public double Amount { get; set; } + public string Description { get; set; } + public string Metadata { get; set; } + public object[] Products { get; set; } + public string RequestId { get; set; } + + public CreateCpmTransaction(string cpmToken, string shopId, double amount) => + (CpmToken, ShopId, Amount) = (cpmToken, shopId, amount); + + private string path { get { return "/transactions" + "/cpm"; } } + + private static readonly HttpMethod method = new HttpMethod("POST"); + + public async Task Send(Client client) { + string res = await client.Send(path, CreateCpmTransaction.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateExchangeTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreateExchangeTransaction.cs index 967b91c..e5af268 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreateExchangeTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreateExchangeTransaction.cs @@ -24,9 +24,9 @@ public CreateExchangeTransaction(string userId, string senderPrivateMoneyId, str private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, CreateExchangeTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateExternalTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreateExternalTransaction.cs new file mode 100644 index 0000000..021364f --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/CreateExternalTransaction.cs @@ -0,0 +1,34 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class CreateExternalTransaction + { + public string ShopId { get; set; } + public string CustomerId { get; set; } + public string PrivateMoneyId { get; set; } + public int Amount { get; set; } + public string Description { get; set; } + public string Metadata { get; set; } + public object[] Products { get; set; } + public string RequestId { get; set; } + + public CreateExternalTransaction(string shopId, string customerId, string privateMoneyId, int amount) => + (ShopId, CustomerId, PrivateMoneyId, Amount) = (shopId, customerId, privateMoneyId, amount); + + private string path { get { return "/external-transactions"; } } + + private static readonly HttpMethod method = new HttpMethod("POST"); + + public async Task Send(Client client) { + string res = await client.Send(path, CreateExternalTransaction.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/CreatePaymentTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreatePaymentTransaction.cs index f4c99c6..d516ba4 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreatePaymentTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreatePaymentTransaction.cs @@ -13,20 +13,22 @@ public class CreatePaymentTransaction public string ShopId { get; set; } public string CustomerId { get; set; } public string PrivateMoneyId { get; set; } - public double Amount { get; set; } + public int Amount { get; set; } public string Description { get; set; } + public string Metadata { get; set; } + public object[] Products { get; set; } public string RequestId { get; set; } - public CreatePaymentTransaction(string shopId, string customerId, string privateMoneyId, double amount) => + public CreatePaymentTransaction(string shopId, string customerId, string privateMoneyId, int amount) => (ShopId, CustomerId, PrivateMoneyId, Amount) = (shopId, customerId, privateMoneyId, amount); private string path { get { return "/transactions" + "/payment"; } } private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, CreatePaymentTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransaction.cs index 0cdfe82..629b3af 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransaction.cs @@ -14,10 +14,11 @@ public class CreateTopupTransaction public string CustomerId { get; set; } public string PrivateMoneyId { get; set; } public string BearPointShopId { get; set; } - public double MoneyAmount { get; set; } - public double PointAmount { get; set; } + public int MoneyAmount { get; set; } + public int PointAmount { get; set; } public string PointExpiresAt { get; set; } public string Description { get; set; } + public string Metadata { get; set; } public string RequestId { get; set; } public CreateTopupTransaction(string shopId, string customerId, string privateMoneyId) => @@ -27,9 +28,9 @@ public CreateTopupTransaction(string shopId, string customerId, string privateMo private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, CreateTopupTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransactionWithCheck.cs b/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransactionWithCheck.cs index 76531dd..214ac48 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransactionWithCheck.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreateTopupTransactionWithCheck.cs @@ -20,9 +20,9 @@ public CreateTopupTransactionWithCheck(string checkId, string customerId) => private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, CreateTopupTransactionWithCheck.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreateTransaction.cs index e50fabb..64553b1 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreateTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreateTransaction.cs @@ -25,9 +25,9 @@ public CreateTransaction(string shopId, string customerId, string privateMoneyId private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, CreateTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateTransferTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/CreateTransferTransaction.cs index 73c11b7..c08da68 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreateTransferTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreateTransferTransaction.cs @@ -14,6 +14,7 @@ public class CreateTransferTransaction public string ReceiverId { get; set; } public string PrivateMoneyId { get; set; } public double Amount { get; set; } + public string Metadata { get; set; } public string Description { get; set; } public string RequestId { get; set; } @@ -24,9 +25,9 @@ public CreateTransferTransaction(string senderId, string receiverId, string priv private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, CreateTransferTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateUserAccount.cs b/src/PokepayPartnerCsharpSdk/Request/CreateUserAccount.cs new file mode 100644 index 0000000..cb0f243 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/CreateUserAccount.cs @@ -0,0 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class CreateUserAccount + { + private string UserId { get; set; } + public string PrivateMoneyId { get; set; } + public string Name { get; set; } + public string ExternalId { get; set; } + + public CreateUserAccount(string userId, string privateMoneyId) => + (UserId, PrivateMoneyId) = (userId, privateMoneyId); + + private string path { get { return "/users" + "/" + UserId + "/accounts"; } } + + private static readonly HttpMethod method = new HttpMethod("POST"); + + public async Task Send(Client client) { + string res = await client.Send(path, CreateUserAccount.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/DeleteAccount.cs b/src/PokepayPartnerCsharpSdk/Request/DeleteAccount.cs new file mode 100644 index 0000000..c0ed119 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/DeleteAccount.cs @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class DeleteAccount + { + private string AccountId { get; set; } + public bool Cashback { get; set; } + + public DeleteAccount(string accountId) => + (AccountId) = (accountId); + + private string path { get { return "/accounts" + "/" + AccountId; } } + + private static readonly HttpMethod method = new HttpMethod("DELETE"); + + public async Task Send(Client client) { + string res = await client.Send(path, DeleteAccount.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/GetCampaign.cs b/src/PokepayPartnerCsharpSdk/Request/GetCampaign.cs new file mode 100644 index 0000000..1ad7136 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/GetCampaign.cs @@ -0,0 +1,27 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class GetCampaign + { + private string CampaignId { get; set; } + + public GetCampaign(string campaignId) => + (CampaignId) = (campaignId); + + private string path { get { return "/campaigns" + "/" + CampaignId; } } + + private static readonly HttpMethod method = new HttpMethod("GET"); + + public async Task Send(Client client) { + string res = await client.Send(path, GetCampaign.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/GetCpmToken.cs b/src/PokepayPartnerCsharpSdk/Request/GetCpmToken.cs new file mode 100644 index 0000000..d8963f0 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/GetCpmToken.cs @@ -0,0 +1,27 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class GetCpmToken + { + private string CpmToken { get; set; } + + public GetCpmToken(string cpmToken) => + (CpmToken) = (cpmToken); + + private string path { get { return "/cpm" + "/" + CpmToken; } } + + private static readonly HttpMethod method = new HttpMethod("GET"); + + public async Task Send(Client client) { + string res = await client.Send(path, GetCpmToken.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/GetCustomerAccounts.cs b/src/PokepayPartnerCsharpSdk/Request/GetCustomerAccounts.cs index d7a712f..0f0a906 100644 --- a/src/PokepayPartnerCsharpSdk/Request/GetCustomerAccounts.cs +++ b/src/PokepayPartnerCsharpSdk/Request/GetCustomerAccounts.cs @@ -16,6 +16,7 @@ public class GetCustomerAccounts public string CreatedAtFrom { get; set; } public string CreatedAtTo { get; set; } public bool IsSuspended { get; set; } + public string Status { get; set; } public string ExternalId { get; set; } public string Tel { get; set; } public string Email { get; set; } diff --git a/src/PokepayPartnerCsharpSdk/Request/GetPrivateMoneySummary.cs b/src/PokepayPartnerCsharpSdk/Request/GetPrivateMoneySummary.cs new file mode 100644 index 0000000..f1913da --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/GetPrivateMoneySummary.cs @@ -0,0 +1,29 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class GetPrivateMoneySummary + { + private string PrivateMoneyId { get; set; } + public string From { get; set; } + public string To { get; set; } + + public GetPrivateMoneySummary(string privateMoneyId) => + (PrivateMoneyId) = (privateMoneyId); + + private string path { get { return "/private-moneys" + "/" + PrivateMoneyId + "/summary"; } } + + private static readonly HttpMethod method = new HttpMethod("GET"); + + public async Task Send(Client client) { + string res = await client.Send(path, GetPrivateMoneySummary.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/GetTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/GetTransaction.cs index 08e6073..b8f0fae 100644 --- a/src/PokepayPartnerCsharpSdk/Request/GetTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/GetTransaction.cs @@ -19,9 +19,9 @@ public GetTransaction(string transactionId) => private static readonly HttpMethod method = new HttpMethod("GET"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, GetTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/ListCampaigns.cs b/src/PokepayPartnerCsharpSdk/Request/ListCampaigns.cs new file mode 100644 index 0000000..f173afb --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/ListCampaigns.cs @@ -0,0 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class ListCampaigns + { + public string PrivateMoneyId { get; set; } + public bool IsOngoing { get; set; } + public int Page { get; set; } + public int PerPage { get; set; } + + public ListCampaigns(string privateMoneyId) => + (PrivateMoneyId) = (privateMoneyId); + + private string path { get { return "/campaigns"; } } + + private static readonly HttpMethod method = new HttpMethod("GET"); + + public async Task Send(Client client) { + string res = await client.Send(path, ListCampaigns.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/ListTransactionsV2.cs b/src/PokepayPartnerCsharpSdk/Request/ListTransactionsV2.cs new file mode 100644 index 0000000..ddb1515 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/ListTransactionsV2.cs @@ -0,0 +1,41 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class ListTransactionsV2 + { + public string PrivateMoneyId { get; set; } + public string OrganizationCode { get; set; } + public string ShopId { get; set; } + public string TerminalId { get; set; } + public string CustomerId { get; set; } + public string CustomerName { get; set; } + public string Description { get; set; } + public string TransactionId { get; set; } + public bool IsModified { get; set; } + public string[] Types { get; set; } + public string From { get; set; } + public string To { get; set; } + public string NextPageCursorId { get; set; } + public string PrevPageCursorId { get; set; } + public int PerPage { get; set; } + + public ListTransactionsV2(string privateMoneyId) => + (PrivateMoneyId) = (privateMoneyId); + + private string path { get { return "/transactions-v2"; } } + + private static readonly HttpMethod method = new HttpMethod("GET"); + + public async Task Send(Client client) { + string res = await client.Send(path, ListTransactionsV2.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/ListUserAccounts.cs b/src/PokepayPartnerCsharpSdk/Request/ListUserAccounts.cs index 11d719f..cae0a11 100644 --- a/src/PokepayPartnerCsharpSdk/Request/ListUserAccounts.cs +++ b/src/PokepayPartnerCsharpSdk/Request/ListUserAccounts.cs @@ -11,6 +11,8 @@ namespace PokepayPartnerCsharpSdk.Request public class ListUserAccounts { private string UserId { get; set; } + public int Page { get; set; } + public int PerPage { get; set; } public ListUserAccounts(string userId) => (UserId) = (userId); @@ -19,9 +21,9 @@ public ListUserAccounts(string userId) => private static readonly HttpMethod method = new HttpMethod("GET"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, ListUserAccounts.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/RefundExternalTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/RefundExternalTransaction.cs new file mode 100644 index 0000000..f959d87 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/RefundExternalTransaction.cs @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class RefundExternalTransaction + { + private string EventId { get; set; } + public string Description { get; set; } + + public RefundExternalTransaction(string eventId) => + (EventId) = (eventId); + + private string path { get { return "/external-transactions" + "/" + EventId + "/refund"; } } + + private static readonly HttpMethod method = new HttpMethod("POST"); + + public async Task Send(Client client) { + string res = await client.Send(path, RefundExternalTransaction.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/RefundTransaction.cs b/src/PokepayPartnerCsharpSdk/Request/RefundTransaction.cs index 69110d1..b458338 100644 --- a/src/PokepayPartnerCsharpSdk/Request/RefundTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Request/RefundTransaction.cs @@ -20,9 +20,9 @@ public RefundTransaction(string transactionId) => private static readonly HttpMethod method = new HttpMethod("POST"); - public async Task Send(Client client) { + public async Task Send(Client client) { string res = await client.Send(path, RefundTransaction.method, this); - return JsonSerializer.Deserialize(res, client.JsonOptions); + return JsonSerializer.Deserialize(res, client.JsonOptions); } } } diff --git a/src/PokepayPartnerCsharpSdk/Request/UpdateAccount.cs b/src/PokepayPartnerCsharpSdk/Request/UpdateAccount.cs index d1704aa..8bdbe40 100644 --- a/src/PokepayPartnerCsharpSdk/Request/UpdateAccount.cs +++ b/src/PokepayPartnerCsharpSdk/Request/UpdateAccount.cs @@ -12,6 +12,8 @@ public class UpdateAccount { private string AccountId { get; set; } public bool IsSuspended { get; set; } + public string Status { get; set; } + public bool CanTransferTopup { get; set; } public UpdateAccount(string accountId) => (AccountId) = (accountId); diff --git a/src/PokepayPartnerCsharpSdk/Request/UpdateCampaign.cs b/src/PokepayPartnerCsharpSdk/Request/UpdateCampaign.cs new file mode 100644 index 0000000..bec79ca --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/UpdateCampaign.cs @@ -0,0 +1,44 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class UpdateCampaign + { + private string CampaignId { get; set; } + public string Name { get; set; } + public string StartsAt { get; set; } + public string EndsAt { get; set; } + public int Priority { get; set; } + public string Event { get; set; } + public string Description { get; set; } + public string Status { get; set; } + public string PointExpiresAt { get; set; } + public int PointExpiresInDays { get; set; } + public bool IsExclusive { get; set; } + public string Subject { get; set; } + public object[] AmountBasedPointRules { get; set; } + public object[] ProductBasedPointRules { get; set; } + public int[] ApplicableDaysOfWeek { get; set; } + public object[] ApplicableTimeRanges { get; set; } + public string[] ApplicableShopIds { get; set; } + public int MinimumNumberForCombinationPurchase { get; set; } + + public UpdateCampaign(string campaignId) => + (CampaignId) = (campaignId); + + private string path { get { return "/campaigns" + "/" + CampaignId; } } + + private static readonly HttpMethod method = new HttpMethod("PATCH"); + + public async Task Send(Client client) { + string res = await client.Send(path, UpdateCampaign.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Request/UpdateCustomerAccount.cs b/src/PokepayPartnerCsharpSdk/Request/UpdateCustomerAccount.cs new file mode 100644 index 0000000..d8b6395 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Request/UpdateCustomerAccount.cs @@ -0,0 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Net.Http; +using System.Text.Json; +using System.Threading.Tasks; + +using PokepayPartnerCsharpSdk; +using PokepayPartnerCsharpSdk.Response; + +namespace PokepayPartnerCsharpSdk.Request +{ + public class UpdateCustomerAccount + { + private string AccountId { get; set; } + public string Status { get; set; } + public string AccountName { get; set; } + public string ExternalId { get; set; } + + public UpdateCustomerAccount(string accountId) => + (AccountId) = (accountId); + + private string path { get { return "/accounts" + "/" + AccountId + "/customers"; } } + + private static readonly HttpMethod method = new HttpMethod("PATCH"); + + public async Task Send(Client client) { + string res = await client.Send(path, UpdateCustomerAccount.method, this); + return JsonSerializer.Deserialize(res, client.JsonOptions); + } + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/Account.cs b/src/PokepayPartnerCsharpSdk/Response/Account.cs index a2b2274..594ce29 100644 --- a/src/PokepayPartnerCsharpSdk/Response/Account.cs +++ b/src/PokepayPartnerCsharpSdk/Response/Account.cs @@ -8,10 +8,11 @@ public class Account public string Id { get; } public string Name { get; } public bool IsSuspended { get; } + public string Status { get; } public PrivateMoney PrivateMoney { get; } [JsonConstructor] - public Account(string id, string name, bool isSuspended, PrivateMoney privateMoney) => - (Id, Name, IsSuspended, PrivateMoney) = (id, name, isSuspended, privateMoney); + public Account(string id, string name, bool isSuspended, string status, PrivateMoney privateMoney) => + (Id, Name, IsSuspended, Status, PrivateMoney) = (id, name, isSuspended, status, privateMoney); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/AccountDeleted.cs b/src/PokepayPartnerCsharpSdk/Response/AccountDeleted.cs new file mode 100644 index 0000000..400654b --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/AccountDeleted.cs @@ -0,0 +1,11 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class AccountDeleted + { + + + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/AccountDetail.cs b/src/PokepayPartnerCsharpSdk/Response/AccountDetail.cs index 329ca0d..2650455 100644 --- a/src/PokepayPartnerCsharpSdk/Response/AccountDetail.cs +++ b/src/PokepayPartnerCsharpSdk/Response/AccountDetail.cs @@ -8,13 +8,16 @@ public class AccountDetail public string Id { get; } public string Name { get; } public bool IsSuspended { get; } + public string Status { get; } public double Balance { get; } public double MoneyBalance { get; } public double PointBalance { get; } public PrivateMoney PrivateMoney { get; } + public User User { get; } + public string ExternalId { get; } [JsonConstructor] - public AccountDetail(string id, string name, bool isSuspended, double balance, double moneyBalance, double pointBalance, PrivateMoney privateMoney) => - (Id, Name, IsSuspended, Balance, MoneyBalance, PointBalance, PrivateMoney) = (id, name, isSuspended, balance, moneyBalance, pointBalance, privateMoney); + public AccountDetail(string id, string name, bool isSuspended, string status, double balance, double moneyBalance, double pointBalance, PrivateMoney privateMoney, User user) => + (Id, Name, IsSuspended, Status, Balance, MoneyBalance, PointBalance, PrivateMoney, User) = (id, name, isSuspended, status, balance, moneyBalance, pointBalance, privateMoney, user); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/AccountWithUser.cs b/src/PokepayPartnerCsharpSdk/Response/AccountWithUser.cs index f5d9cfa..21cceac 100644 --- a/src/PokepayPartnerCsharpSdk/Response/AccountWithUser.cs +++ b/src/PokepayPartnerCsharpSdk/Response/AccountWithUser.cs @@ -8,12 +8,12 @@ public class AccountWithUser public string Id { get; } public string Name { get; } public bool IsSuspended { get; } + public string Status { get; } public PrivateMoney PrivateMoney { get; } public User User { get; } - public string ExternalId { get; } [JsonConstructor] - public AccountWithUser(string id, string name, bool isSuspended, PrivateMoney privateMoney, User user, string externalId) => - (Id, Name, IsSuspended, PrivateMoney, User, ExternalId) = (id, name, isSuspended, privateMoney, user, externalId); + public AccountWithUser(string id, string name, bool isSuspended, string status, PrivateMoney privateMoney, User user) => + (Id, Name, IsSuspended, Status, PrivateMoney, User) = (id, name, isSuspended, status, privateMoney, user); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/AccountWithoutPrivateMoneyDetail.cs b/src/PokepayPartnerCsharpSdk/Response/AccountWithoutPrivateMoneyDetail.cs index 0817c05..7a0a194 100644 --- a/src/PokepayPartnerCsharpSdk/Response/AccountWithoutPrivateMoneyDetail.cs +++ b/src/PokepayPartnerCsharpSdk/Response/AccountWithoutPrivateMoneyDetail.cs @@ -8,11 +8,12 @@ public class AccountWithoutPrivateMoneyDetail public string Id { get; } public string Name { get; } public bool IsSuspended { get; } + public string Status { get; } public string PrivateMoneyId { get; } public User User { get; } [JsonConstructor] - public AccountWithoutPrivateMoneyDetail(string id, string name, bool isSuspended, string privateMoneyId, User user) => - (Id, Name, IsSuspended, PrivateMoneyId, User) = (id, name, isSuspended, privateMoneyId, user); + public AccountWithoutPrivateMoneyDetail(string id, string name, bool isSuspended, string status, string privateMoneyId, User user) => + (Id, Name, IsSuspended, Status, PrivateMoneyId, User) = (id, name, isSuspended, status, privateMoneyId, user); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/Bill.cs b/src/PokepayPartnerCsharpSdk/Response/Bill.cs index d3e62ad..cfd43d4 100644 --- a/src/PokepayPartnerCsharpSdk/Response/Bill.cs +++ b/src/PokepayPartnerCsharpSdk/Response/Bill.cs @@ -15,7 +15,7 @@ public class Bill public string Token { get; } [JsonConstructor] - public Bill(string id, double amount, double maxAmount, double minAmount, string description, AccountWithUser account, bool isDisabled, string token) => - (Id, Amount, MaxAmount, MinAmount, Description, Account, IsDisabled, Token) = (id, amount, maxAmount, minAmount, description, account, isDisabled, token); + public Bill(string id, string description, AccountWithUser account, bool isDisabled, string token) => + (Id, Description, Account, IsDisabled, Token) = (id, description, account, isDisabled, token); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/BulkTransaction.cs b/src/PokepayPartnerCsharpSdk/Response/BulkTransaction.cs index 055b390..714cbc8 100644 --- a/src/PokepayPartnerCsharpSdk/Response/BulkTransaction.cs +++ b/src/PokepayPartnerCsharpSdk/Response/BulkTransaction.cs @@ -16,7 +16,7 @@ public class BulkTransaction public string UpdatedAt { get; } [JsonConstructor] - public BulkTransaction(string id, string requestId, string name, string description, string status, string error, int errorLineno, string submittedAt, string updatedAt) => - (Id, RequestId, Name, Description, Status, Error, ErrorLineno, SubmittedAt, UpdatedAt) = (id, requestId, name, description, status, error, errorLineno, submittedAt, updatedAt); + public BulkTransaction(string id, string requestId, string name, string description, string status, string submittedAt, string updatedAt) => + (Id, RequestId, Name, Description, Status, SubmittedAt, UpdatedAt) = (id, requestId, name, description, status, submittedAt, updatedAt); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/Campaign.cs b/src/PokepayPartnerCsharpSdk/Response/Campaign.cs new file mode 100644 index 0000000..6a0028b --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/Campaign.cs @@ -0,0 +1,29 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class Campaign + { + public string Id { get; } + public string Name { get; } + public User[] ApplicableShops { get; } + public bool IsExclusive { get; } + public string StartsAt { get; } + public string EndsAt { get; } + public string PointExpiresAt { get; } + public int PointExpiresInDays { get; } + public int Priority { get; } + public string Description { get; } + public User BearPointShop { get; } + public PrivateMoney PrivateMoney { get; } + public PrivateMoney DestPrivateMoney { get; } + public string PointCalculationRule { get; } + public string PointCalculationRuleObject { get; } + public string Status { get; } + + [JsonConstructor] + public Campaign(string id, string name, bool isExclusive, string startsAt, string endsAt, int priority, string description, User bearPointShop, PrivateMoney privateMoney, PrivateMoney destPrivateMoney, string pointCalculationRule, string pointCalculationRuleObject, string status) => + (Id, Name, IsExclusive, StartsAt, EndsAt, Priority, Description, BearPointShop, PrivateMoney, DestPrivateMoney, PointCalculationRule, PointCalculationRuleObject, Status) = (id, name, isExclusive, startsAt, endsAt, priority, description, bearPointShop, privateMoney, destPrivateMoney, pointCalculationRule, pointCalculationRuleObject, status); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/Cashtray.cs b/src/PokepayPartnerCsharpSdk/Response/Cashtray.cs index 19c9abb..706780c 100644 --- a/src/PokepayPartnerCsharpSdk/Response/Cashtray.cs +++ b/src/PokepayPartnerCsharpSdk/Response/Cashtray.cs @@ -14,7 +14,7 @@ public class Cashtray public string Token { get; } [JsonConstructor] - public Cashtray(string id, double amount, string description, AccountWithUser account, string expiresAt, string canceledAt, string token) => - (Id, Amount, Description, Account, ExpiresAt, CanceledAt, Token) = (id, amount, description, account, expiresAt, canceledAt, token); + public Cashtray(string id, double amount, string description, AccountWithUser account, string expiresAt, string token) => + (Id, Amount, Description, Account, ExpiresAt, Token) = (id, amount, description, account, expiresAt, token); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/CashtrayAttempt.cs b/src/PokepayPartnerCsharpSdk/Response/CashtrayAttempt.cs index 0f25cc9..8819fed 100644 --- a/src/PokepayPartnerCsharpSdk/Response/CashtrayAttempt.cs +++ b/src/PokepayPartnerCsharpSdk/Response/CashtrayAttempt.cs @@ -12,7 +12,7 @@ public class CashtrayAttempt public string CreatedAt { get; } [JsonConstructor] - public CashtrayAttempt(AccountWithUser account, double statusCode, string errorType, string errorMessage, string createdAt) => - (Account, StatusCode, ErrorType, ErrorMessage, CreatedAt) = (account, statusCode, errorType, errorMessage, createdAt); + public CashtrayAttempt(double statusCode, string errorType, string errorMessage, string createdAt) => + (StatusCode, ErrorType, ErrorMessage, CreatedAt) = (statusCode, errorType, errorMessage, createdAt); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/CashtrayWithResult.cs b/src/PokepayPartnerCsharpSdk/Response/CashtrayWithResult.cs index 96f4c87..e321148 100644 --- a/src/PokepayPartnerCsharpSdk/Response/CashtrayWithResult.cs +++ b/src/PokepayPartnerCsharpSdk/Response/CashtrayWithResult.cs @@ -16,7 +16,7 @@ public class CashtrayWithResult public Transaction Transaction { get; } [JsonConstructor] - public CashtrayWithResult(string id, double amount, string description, AccountWithUser account, string expiresAt, string canceledAt, string token, CashtrayAttempt attempt, Transaction transaction) => - (Id, Amount, Description, Account, ExpiresAt, CanceledAt, Token, Attempt, Transaction) = (id, amount, description, account, expiresAt, canceledAt, token, attempt, transaction); + public CashtrayWithResult(string id, double amount, string description, AccountWithUser account, string expiresAt, string token) => + (Id, Amount, Description, Account, ExpiresAt, Token) = (id, amount, description, account, expiresAt, token); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/CpmToken.cs b/src/PokepayPartnerCsharpSdk/Response/CpmToken.cs new file mode 100644 index 0000000..0f8697c --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/CpmToken.cs @@ -0,0 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class CpmToken + { + public string cpm_token { get; } + public AccountDetail Account { get; } + public Transaction Transaction { get; } + public ExternalTransaction Event { get; } + public string[] Scopes { get; } + public string ExpiresAt { get; } + public string Metadata { get; } + + [JsonConstructor] + public CpmToken(string cpmToken, AccountDetail account, string[] scopes, string expiresAt, string metadata) => + (this.cpm_token, Account, Scopes, ExpiresAt, Metadata) = (cpmToken, account, scopes, expiresAt, metadata); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/ExternalTransaction.cs b/src/PokepayPartnerCsharpSdk/Response/ExternalTransaction.cs new file mode 100644 index 0000000..6c75c1e --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/ExternalTransaction.cs @@ -0,0 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class ExternalTransaction + { + public string Id { get; } + public bool IsModified { get; } + public User Sender { get; } + public Account SenderAccount { get; } + public User Receiver { get; } + public Account ReceiverAccount { get; } + public double Amount { get; } + public string DoneAt { get; } + public string Description { get; } + + [JsonConstructor] + public ExternalTransaction(string id, bool isModified, User sender, Account senderAccount, User receiver, Account receiverAccount, double amount, string doneAt, string description) => + (Id, IsModified, Sender, SenderAccount, Receiver, ReceiverAccount, Amount, DoneAt, Description) = (id, isModified, sender, senderAccount, receiver, receiverAccount, amount, doneAt, description); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/PaginatedAccountDetails.cs b/src/PokepayPartnerCsharpSdk/Response/PaginatedAccountDetails.cs new file mode 100644 index 0000000..5f17ab5 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/PaginatedAccountDetails.cs @@ -0,0 +1,16 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class PaginatedAccountDetails + { + public AccountDetail[] Rows { get; } + public int Count { get; } + public Pagination Pagination { get; } + + [JsonConstructor] + public PaginatedAccountDetails(AccountDetail[] rows, int count, Pagination pagination) => + (Rows, Count, Pagination) = (rows, count, pagination); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/PaginatedCampaigns.cs b/src/PokepayPartnerCsharpSdk/Response/PaginatedCampaigns.cs new file mode 100644 index 0000000..6ae0626 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/PaginatedCampaigns.cs @@ -0,0 +1,16 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class PaginatedCampaigns + { + public Campaign[] Rows { get; } + public int Count { get; } + public Pagination Pagination { get; } + + [JsonConstructor] + public PaginatedCampaigns(Campaign[] rows, int count, Pagination pagination) => + (Rows, Count, Pagination) = (rows, count, pagination); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/PaginatedTransactionV2.cs b/src/PokepayPartnerCsharpSdk/Response/PaginatedTransactionV2.cs new file mode 100644 index 0000000..8c25b20 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/PaginatedTransactionV2.cs @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class PaginatedTransactionV2 + { + public Transaction[] Rows { get; } + public int PerPage { get; } + public int Count { get; } + public string NextPageCursorId { get; } + public string PrevPageCursorId { get; } + + [JsonConstructor] + public PaginatedTransactionV2(Transaction[] rows, int perPage, int count) => + (Rows, PerPage, Count) = (rows, perPage, count); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/PrivateMoney.cs b/src/PokepayPartnerCsharpSdk/Response/PrivateMoney.cs index 1212c52..07fb94f 100644 --- a/src/PokepayPartnerCsharpSdk/Response/PrivateMoney.cs +++ b/src/PokepayPartnerCsharpSdk/Response/PrivateMoney.cs @@ -17,9 +17,10 @@ public class PrivateMoney public string Type { get; } public string ExpirationType { get; } public bool EnableTopupByMember { get; } + public string DisplayMoneyAndPoint { get; } [JsonConstructor] - public PrivateMoney(string id, string name, string unit, bool isExclusive, string description, string onelineMessage, Organization organization, double maxBalance, double transferLimit, string type, string expirationType, bool enableTopupByMember) => - (Id, Name, Unit, IsExclusive, Description, OnelineMessage, Organization, MaxBalance, TransferLimit, Type, ExpirationType, EnableTopupByMember) = (id, name, unit, isExclusive, description, onelineMessage, organization, maxBalance, transferLimit, type, expirationType, enableTopupByMember); + public PrivateMoney(string id, string name, string unit, bool isExclusive, string description, string onelineMessage, Organization organization, double maxBalance, double transferLimit, string type, string expirationType, string displayMoneyAndPoint) => + (Id, Name, Unit, IsExclusive, Description, OnelineMessage, Organization, MaxBalance, TransferLimit, Type, ExpirationType, DisplayMoneyAndPoint) = (id, name, unit, isExclusive, description, onelineMessage, organization, maxBalance, transferLimit, type, expirationType, displayMoneyAndPoint); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/PrivateMoneySummary.cs b/src/PokepayPartnerCsharpSdk/Response/PrivateMoneySummary.cs new file mode 100644 index 0000000..413968e --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/PrivateMoneySummary.cs @@ -0,0 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class PrivateMoneySummary + { + public double TopupAmount { get; } + public double RefundedTopupAmount { get; } + public double PaymentAmount { get; } + public double RefundedPaymentAmount { get; } + public double AddedPointAmount { get; } + public double RefundedAddedPointAmount { get; } + public double ExchangeInflowAmount { get; } + public double ExchangeOutflowAmount { get; } + public int TransactionCount { get; } + + [JsonConstructor] + public PrivateMoneySummary(double topupAmount, double refundedTopupAmount, double paymentAmount, double refundedPaymentAmount, double addedPointAmount, double refundedAddedPointAmount, double exchangeInflowAmount, double exchangeOutflowAmount, int transactionCount) => + (TopupAmount, RefundedTopupAmount, PaymentAmount, RefundedPaymentAmount, AddedPointAmount, RefundedAddedPointAmount, ExchangeInflowAmount, ExchangeOutflowAmount, TransactionCount) = (topupAmount, refundedTopupAmount, paymentAmount, refundedPaymentAmount, addedPointAmount, refundedAddedPointAmount, exchangeInflowAmount, exchangeOutflowAmount, transactionCount); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/Product.cs b/src/PokepayPartnerCsharpSdk/Response/Product.cs new file mode 100644 index 0000000..49a1538 --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/Product.cs @@ -0,0 +1,19 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class Product + { + public string JanCode { get; } + public string Name { get; } + public double UnitPrice { get; } + public double Price { get; } + public bool IsDiscounted { get; } + public string Other { get; } + + [JsonConstructor] + public Product(string janCode, string name, double unitPrice, double price, bool isDiscounted, string other) => + (JanCode, Name, UnitPrice, Price, IsDiscounted, Other) = (janCode, name, unitPrice, price, isDiscounted, other); + } +} diff --git a/src/PokepayPartnerCsharpSdk/Response/ShopWithAccounts.cs b/src/PokepayPartnerCsharpSdk/Response/ShopWithAccounts.cs index 3613f03..7ad634d 100644 --- a/src/PokepayPartnerCsharpSdk/Response/ShopWithAccounts.cs +++ b/src/PokepayPartnerCsharpSdk/Response/ShopWithAccounts.cs @@ -16,7 +16,7 @@ public class ShopWithAccounts public ShopAccount[] Accounts { get; } [JsonConstructor] - public ShopWithAccounts(string id, string name, string organizationCode, string postalCode, string address, string tel, string email, string externalId, ShopAccount[] accounts) => - (Id, Name, OrganizationCode, PostalCode, Address, Tel, Email, ExternalId, Accounts) = (id, name, organizationCode, postalCode, address, tel, email, externalId, accounts); + public ShopWithAccounts(string id, string name, string organizationCode, ShopAccount[] accounts) => + (Id, Name, OrganizationCode, Accounts) = (id, name, organizationCode, accounts); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/ShopWithMetadata.cs b/src/PokepayPartnerCsharpSdk/Response/ShopWithMetadata.cs index a12dea5..7c54d1f 100644 --- a/src/PokepayPartnerCsharpSdk/Response/ShopWithMetadata.cs +++ b/src/PokepayPartnerCsharpSdk/Response/ShopWithMetadata.cs @@ -15,7 +15,7 @@ public class ShopWithMetadata public string ExternalId { get; } [JsonConstructor] - public ShopWithMetadata(string id, string name, string organizationCode, string postalCode, string address, string tel, string email, string externalId) => - (Id, Name, OrganizationCode, PostalCode, Address, Tel, Email, ExternalId) = (id, name, organizationCode, postalCode, address, tel, email, externalId); + public ShopWithMetadata(string id, string name, string organizationCode) => + (Id, Name, OrganizationCode) = (id, name, organizationCode); } } diff --git a/src/PokepayPartnerCsharpSdk/Response/TransactionDetail.cs b/src/PokepayPartnerCsharpSdk/Response/TransactionDetail.cs new file mode 100644 index 0000000..9fc94da --- /dev/null +++ b/src/PokepayPartnerCsharpSdk/Response/TransactionDetail.cs @@ -0,0 +1,26 @@ +// DO NOT EDIT: File is generated by code generator. +using System.Text.Json.Serialization; + +namespace PokepayPartnerCsharpSdk.Response +{ + public class TransactionDetail + { + public string Id { get; } + public string Type { get; } + public bool IsModified { get; } + public User Sender { get; } + public Account SenderAccount { get; } + public User Receiver { get; } + public Account ReceiverAccount { get; } + public double Amount { get; } + public double MoneyAmount { get; } + public double PointAmount { get; } + public string DoneAt { get; } + public string Description { get; } + public Transfer[] Transfers { get; } + + [JsonConstructor] + public TransactionDetail(string id, string type, bool isModified, User sender, Account senderAccount, User receiver, Account receiverAccount, double amount, double moneyAmount, double pointAmount, string doneAt, string description, Transfer[] transfers) => + (Id, Type, IsModified, Sender, SenderAccount, Receiver, ReceiverAccount, Amount, MoneyAmount, PointAmount, DoneAt, Description, Transfers) = (id, type, isModified, sender, senderAccount, receiver, receiverAccount, amount, moneyAmount, pointAmount, doneAt, description, transfers); + } +} From 51b0e873e7a2b7b5051aa37bf9c6e058921ad761 Mon Sep 17 00:00:00 2001 From: Satoshi Imai Date: Thu, 18 Aug 2022 14:00:01 +0900 Subject: [PATCH 2/4] Remove temporary file --- .../#TestCreatePaymentTransaction.cs# | 146 ------------------ 1 file changed, 146 deletions(-) delete mode 100644 src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# diff --git a/src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# b/src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# deleted file mode 100644 index 8bcf7d2..0000000 --- a/src/PokepayPartnerCsharpSdk.Test/#TestCreatePaymentTransaction.cs# +++ /dev/null @@ -1,146 +0,0 @@ -// DO NOT EDIT: File is generated by code generator. -using System; -using System.Net; -using System.Net.Http; -using NUnit.Framework; -using System.Threading.Tasks; -using System.Collections.Generic; - -using PokepayPartnerCsharpSdk; - -namespace PokepayPartnerCsharpSdk.Test -{ - public class TestCreatePaymentTransaction - { - private Client client; - - [OneTimeSetUp] - public void OneTimeSetup() - { - client = new Client("~/.pokepay/test-config.ini"); - } - - [Test] - public async Task CreatePaymentTransaction0() - { - try { - Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "72eb3c2c-8c93-4f56-9365-264bab09ef93", - "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", - "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", - 7125 - ); - Response.TransactionDetail response = await request.Send(client); - Assert.NotNull(response, "Shouldn't be null at least"); - } catch (HttpRequestException e) { - Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); - Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); - } - } - - [Test] - public async Task CreatePaymentTransaction1() - { - try { - Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "72eb3c2c-8c93-4f56-9365-264bab09ef93", - "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", - "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", - 7125 - ) { - RequestId = "caaed78e-be70-4d36-ac89-c0a64bc1ca0a", - }; - Response.TransactionDetail response = await request.Send(client); - Assert.NotNull(response, "Shouldn't be null at least"); - } catch (HttpRequestException e) { - Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); - Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); - } - } - - [Test] - public async Task CreatePaymentTransaction2() - { - try { - Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "72eb3c2c-8c93-4f56-9365-264bab09ef93", - "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", - "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", - 7125 - ) { - Products = new object[]{ - new Dictionary(){ - {"jan_code","abc"}, - {"name","name1"}, - {"unit_price",100}, - {"price",100}, - {"is_discounted",false}, - {"other","{}"} - }, - }, - new Dictionary(){ - {"jan_code","abc"}, - {"name","name1"}, - {"unit_price",100}, - {"price",100}, - {"is_discounted",false}, - {"other","{}"} - } - }, - RequestId = "375e0e3f-d49f-4d1b-8364-25e1c287d7f7", - }; - Response.TransactionDetail response = await request.Send(client); - Assert.NotNull(response, "Shouldn't be null at least"); - } catch (HttpRequestException e) { - Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); - Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); - } - } - - [Test] - public async Task CreatePaymentTransaction3() - { - try { - Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "72eb3c2c-8c93-4f56-9365-264bab09ef93", - "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", - "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", - 7125 - ) { - Metadata = "{\"key\":\"value\"}", - Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, - RequestId = "edfecf7c-6781-488d-8d75-c0e2f323c41d", - }; - Response.TransactionDetail response = await request.Send(client); - Assert.NotNull(response, "Shouldn't be null at least"); - } catch (HttpRequestException e) { - Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); - Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); - } - } - - [Test] - public async Task CreatePaymentTransaction4() - { - try { - Request.CreatePaymentTransaction request = new Request.CreatePaymentTransaction( - "72eb3c2c-8c93-4f56-9365-264bab09ef93", - "ee90f458-2b0d-48d6-bbd4-2a793f4bd44e", - "ecc7f6d2-14fb-47f5-b64e-8a41e3c20229", - 7125 - ) { - Description = "jQ03lDRu1dHypEu4pqRk9KXy", - Metadata = "{\"key\":\"value\"}", - Products = new object[]{new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}, new Dictionary(){{"jan_code","abc"}, {"name","name1"}, {"unit_price",100}, {"price",100}, {"is_discounted",false}, {"other","{}"}}}, - RequestId = "eecf1f7e-aaf7-4b0b-b89a-cd669deb41c1", - }; - Response.TransactionDetail response = await request.Send(client); - Assert.NotNull(response, "Shouldn't be null at least"); - } catch (HttpRequestException e) { - Assert.AreNotEqual((int) e.Data["StatusCode"], (int) HttpStatusCode.BadRequest, "Shouldn't be BadRequest"); - Assert.True((int) e.Data["StatusCode"] >= 300, "Should be larger than 300"); - } - } - - } -} From 638cb501d82f8244984771e2bc24e31f542897a8 Mon Sep 17 00:00:00 2001 From: Satoshi Imai Date: Thu, 18 Aug 2022 16:06:23 +0900 Subject: [PATCH 3/4] event -> eventType --- src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs b/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs index ffbebed..95c70ab 100644 --- a/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs +++ b/src/PokepayPartnerCsharpSdk/Request/CreateCampaign.cs @@ -31,8 +31,8 @@ public class CreateCampaign public int MinimumNumberForCombinationPurchase { get; set; } public string DestPrivateMoneyId { get; set; } - public CreateCampaign(string name, string privateMoneyId, string startsAt, string endsAt, int priority, string event) => - (Name, PrivateMoneyId, StartsAt, EndsAt, Priority, Event) = (name, privateMoneyId, startsAt, endsAt, priority, event); + public CreateCampaign(string name, string privateMoneyId, string startsAt, string endsAt, int priority, string eventType) => + (Name, PrivateMoneyId, StartsAt, EndsAt, Priority, Event) = (name, privateMoneyId, startsAt, endsAt, priority, eventType); private string path { get { return "/campaigns"; } } From d6119bba8ee977095f17fafc040443c52712433a Mon Sep 17 00:00:00 2001 From: SASAO Takahiro Date: Thu, 18 Aug 2022 17:35:12 +0900 Subject: [PATCH 4/4] version 1.2.0 --- src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj b/src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj index e16c99a..a3918f3 100644 --- a/src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj +++ b/src/PokepayPartnerCsharpSdk/PokepayPartnerCsharpSdk.csproj @@ -8,7 +8,7 @@ PocketChange.inc https://github.com/pokepay/pokepay-partner-csharp-sdk MIT - 1.1.3 + 1.2.0 Library True True