flowcommerce 0.2.31 → 0.2.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +231 -116
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566f9941c5592b93dcba9df0fcc05ba7260ebfe1
|
4
|
+
data.tar.gz: 746d6faa3209a1e82959939e94fd7252b37fda6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97cea84661db52ef6c533304e2e1bc7cfc0aac1e13baf5991fc8ef9e0fa738ef961e1e62e1dab266d7991b5da3f62ac390a50f421e1b20415e016af133205c8
|
7
|
+
data.tar.gz: 56844af094d40fddd2dde4a0c9fc6873cbbf4c57fa79b0d49673406d500d055fde1378722808bd93fa8018f0d3cf23acf5d3a109213c7b751847e18dc80dc12d
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
2
|
# Service version: 0.3.65
|
3
|
-
# apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.
|
3
|
+
# apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.80/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,7 +25,7 @@ module Io
|
|
25
25
|
|
26
26
|
BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
|
27
27
|
NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
|
28
|
-
USER_AGENT = 'apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.
|
28
|
+
USER_AGENT = 'apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.3.80/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.3.65' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -2377,6 +2377,14 @@ module Io
|
|
2377
2377
|
nil
|
2378
2378
|
end
|
2379
2379
|
|
2380
|
+
# Create a new online authorization.
|
2381
|
+
def post_online(organization, authorization_form)
|
2382
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2383
|
+
(x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
|
2384
|
+
r = @client.request("/#{CGI.escape(organization)}/authorizations/online").with_json(authorization_form.to_json).post
|
2385
|
+
::Io::Flow::V0::Models::OnlineAuthorization.new(r)
|
2386
|
+
end
|
2387
|
+
|
2380
2388
|
# Provides visibility into recent changes of each object, including deletion
|
2381
2389
|
def get_versions(organization, incoming={})
|
2382
2390
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -4978,8 +4986,6 @@ module Io
|
|
4978
4986
|
MERCHANT_OF_RECORD_AUTHORIZATION_FORM = 'merchant_of_record_authorization_form' unless defined?(MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
|
4979
4987
|
# Enables authorization via PayPal
|
4980
4988
|
PAYPAL_AUTHORIZATION_FORM = 'paypal_authorization_form' unless defined?(PAYPAL_AUTHORIZATION_FORM)
|
4981
|
-
# Enables authorizations via UnionPay
|
4982
|
-
UNIONPAY_AUTHORIZATION_FORM = 'unionpay_authorization_form' unless defined?(UNIONPAY_AUTHORIZATION_FORM)
|
4983
4989
|
# Enables authorizations via redirect-based alternative payment methods, such as
|
4984
4990
|
# AliPay.
|
4985
4991
|
REDIRECT_AUTHORIZATION_FORM = 'redirect_authorization_form' unless defined?(REDIRECT_AUTHORIZATION_FORM)
|
@@ -4994,7 +5000,7 @@ module Io
|
|
4994
5000
|
end
|
4995
5001
|
|
4996
5002
|
def subtype_to_hash
|
4997
|
-
raise 'Cannot serialize an instance of authorization_form directly - must use one of the specific types: authorization_copy_form, direct_authorization_form, merchant_of_record_authorization_form, paypal_authorization_form,
|
5003
|
+
raise 'Cannot serialize an instance of authorization_form directly - must use one of the specific types: authorization_copy_form, direct_authorization_form, merchant_of_record_authorization_form, paypal_authorization_form, redirect_authorization_form'
|
4998
5004
|
end
|
4999
5005
|
|
5000
5006
|
def to_hash
|
@@ -5012,7 +5018,6 @@ module Io
|
|
5012
5018
|
when Types::DIRECT_AUTHORIZATION_FORM; DirectAuthorizationForm.new(hash)
|
5013
5019
|
when Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM; MerchantOfRecordAuthorizationForm.new(hash)
|
5014
5020
|
when Types::PAYPAL_AUTHORIZATION_FORM; PaypalAuthorizationForm.new(hash)
|
5015
|
-
when Types::UNIONPAY_AUTHORIZATION_FORM; UnionpayAuthorizationForm.new(hash)
|
5016
5021
|
when Types::REDIRECT_AUTHORIZATION_FORM; RedirectAuthorizationForm.new(hash)
|
5017
5022
|
else AuthorizationFormUndefinedType.new(:discriminator => discriminator)
|
5018
5023
|
end
|
@@ -5314,6 +5319,7 @@ module Io
|
|
5314
5319
|
PAYMENT_DELETED = 'payment_deleted' unless defined?(PAYMENT_DELETED)
|
5315
5320
|
REFUND_UPSERTED = 'refund_upserted' unless defined?(REFUND_UPSERTED)
|
5316
5321
|
REFUND_UPSERTED_V2 = 'refund_upserted_v2' unless defined?(REFUND_UPSERTED_V2)
|
5322
|
+
REVERSAL_UPSERTED = 'reversal_upserted' unless defined?(REVERSAL_UPSERTED)
|
5317
5323
|
ORGANIZATION_RATES_PUBLISHED = 'organization_rates_published' unless defined?(ORGANIZATION_RATES_PUBLISHED)
|
5318
5324
|
ORGANIZATION_COUNTRIES_PUBLISHED = 'organization_countries_published' unless defined?(ORGANIZATION_COUNTRIES_PUBLISHED)
|
5319
5325
|
RETURN_UPSERTED = 'return_upserted' unless defined?(RETURN_UPSERTED)
|
@@ -5332,7 +5338,7 @@ module Io
|
|
5332
5338
|
end
|
5333
5339
|
|
5334
5340
|
def subtype_to_hash
|
5335
|
-
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, tier_upserted, tier_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, organization_rates_published, organization_countries_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
5341
|
+
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, tier_upserted, tier_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, organization_rates_published, organization_countries_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
5336
5342
|
end
|
5337
5343
|
|
5338
5344
|
def to_hash
|
@@ -5415,6 +5421,7 @@ module Io
|
|
5415
5421
|
when Types::PAYMENT_DELETED; PaymentDeleted.new(hash)
|
5416
5422
|
when Types::REFUND_UPSERTED; RefundUpserted.new(hash)
|
5417
5423
|
when Types::REFUND_UPSERTED_V2; RefundUpsertedV2.new(hash)
|
5424
|
+
when Types::REVERSAL_UPSERTED; ReversalUpserted.new(hash)
|
5418
5425
|
when Types::ORGANIZATION_RATES_PUBLISHED; OrganizationRatesPublished.new(hash)
|
5419
5426
|
when Types::ORGANIZATION_COUNTRIES_PUBLISHED; OrganizationCountriesPublished.new(hash)
|
5420
5427
|
when Types::RETURN_UPSERTED; ReturnUpserted.new(hash)
|
@@ -6304,7 +6311,6 @@ module Io
|
|
6304
6311
|
|
6305
6312
|
module Types
|
6306
6313
|
PAYPAL_AUTHORIZATION_DETAILS = 'paypal_authorization_details' unless defined?(PAYPAL_AUTHORIZATION_DETAILS)
|
6307
|
-
UNIONPAY_AUTHORIZATION_DETAILS = 'unionpay_authorization_details' unless defined?(UNIONPAY_AUTHORIZATION_DETAILS)
|
6308
6314
|
REDIRECT_AUTHORIZATION_DETAILS = 'redirect_authorization_details' unless defined?(REDIRECT_AUTHORIZATION_DETAILS)
|
6309
6315
|
end
|
6310
6316
|
|
@@ -6317,7 +6323,7 @@ module Io
|
|
6317
6323
|
end
|
6318
6324
|
|
6319
6325
|
def subtype_to_hash
|
6320
|
-
raise 'Cannot serialize an instance of online_authorization_details directly - must use one of the specific types: paypal_authorization_details,
|
6326
|
+
raise 'Cannot serialize an instance of online_authorization_details directly - must use one of the specific types: paypal_authorization_details, redirect_authorization_details'
|
6321
6327
|
end
|
6322
6328
|
|
6323
6329
|
def to_hash
|
@@ -6332,7 +6338,6 @@ module Io
|
|
6332
6338
|
end
|
6333
6339
|
case discriminator
|
6334
6340
|
when Types::PAYPAL_AUTHORIZATION_DETAILS; PaypalAuthorizationDetails.new(hash)
|
6335
|
-
when Types::UNIONPAY_AUTHORIZATION_DETAILS; UnionpayAuthorizationDetails.new(hash)
|
6336
6341
|
when Types::REDIRECT_AUTHORIZATION_DETAILS; RedirectAuthorizationDetails.new(hash)
|
6337
6342
|
else OnlineAuthorizationDetailsUndefinedType.new(:discriminator => discriminator)
|
6338
6343
|
end
|
@@ -7302,7 +7307,7 @@ module Io
|
|
7302
7307
|
end
|
7303
7308
|
|
7304
7309
|
def AuthorizationStatus.ALL
|
7305
|
-
@@all ||= [AuthorizationStatus.pending, AuthorizationStatus.expired, AuthorizationStatus.authorized, AuthorizationStatus.review, AuthorizationStatus.declined, AuthorizationStatus.
|
7310
|
+
@@all ||= [AuthorizationStatus.pending, AuthorizationStatus.expired, AuthorizationStatus.authorized, AuthorizationStatus.review, AuthorizationStatus.declined, AuthorizationStatus.reversed]
|
7306
7311
|
end
|
7307
7312
|
|
7308
7313
|
# If an immediate response is not available, the state will be 'pending'. For
|
@@ -7336,11 +7341,11 @@ module Io
|
|
7336
7341
|
@@_declined ||= AuthorizationStatus.new('declined')
|
7337
7342
|
end
|
7338
7343
|
|
7339
|
-
# Indicates the authorization has been
|
7340
|
-
# until the moment you capture funds; once you have captured
|
7341
|
-
# create refunds.
|
7342
|
-
def AuthorizationStatus.
|
7343
|
-
@@
|
7344
|
+
# Indicates the authorization has been fully reversed. You can fully reverse an
|
7345
|
+
# authorization up until the moment you capture funds; once you have captured
|
7346
|
+
# funds you must create refunds.
|
7347
|
+
def AuthorizationStatus.reversed
|
7348
|
+
@@_reversed ||= AuthorizationStatus.new('reversed')
|
7344
7349
|
end
|
7345
7350
|
|
7346
7351
|
def to_hash
|
@@ -8128,7 +8133,7 @@ module Io
|
|
8128
8133
|
end
|
8129
8134
|
|
8130
8135
|
def EventType.ALL
|
8131
|
-
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.organization_rates_published, EventType.organization_countries_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
8136
|
+
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.reversal_upserted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
8132
8137
|
end
|
8133
8138
|
|
8134
8139
|
def EventType.attribute_upserted
|
@@ -8407,6 +8412,10 @@ module Io
|
|
8407
8412
|
@@_refund_upserted_v2 ||= EventType.new('refund_upserted_v2')
|
8408
8413
|
end
|
8409
8414
|
|
8415
|
+
def EventType.reversal_upserted
|
8416
|
+
@@_reversal_upserted ||= EventType.new('reversal_upserted')
|
8417
|
+
end
|
8418
|
+
|
8410
8419
|
def EventType.organization_rates_published
|
8411
8420
|
@@_organization_rates_published ||= EventType.new('organization_rates_published')
|
8412
8421
|
end
|
@@ -8826,7 +8835,7 @@ module Io
|
|
8826
8835
|
end
|
8827
8836
|
|
8828
8837
|
def ImportType.ALL
|
8829
|
-
@@all ||= [ImportType.harmonization_codes, ImportType.
|
8838
|
+
@@all ||= [ImportType.harmonization_codes, ImportType.catalog_items, ImportType.customs_descriptions]
|
8830
8839
|
end
|
8831
8840
|
|
8832
8841
|
# Provides upload of HS-6 and HS-10 codes for the items in a catalog
|
@@ -8834,18 +8843,16 @@ module Io
|
|
8834
8843
|
@@_harmonization_codes ||= ImportType.new('harmonization_codes')
|
8835
8844
|
end
|
8836
8845
|
|
8837
|
-
# Request for phrase suggestions to harmonize items. Request (CSV) must include
|
8838
|
-
# name, material, description columns. Response (CSV) will include up to 5
|
8839
|
-
# suggested phrases
|
8840
|
-
def ImportType.harmonization_phrase_suggestion_request
|
8841
|
-
@@_harmonization_phrase_suggestion_request ||= ImportType.new('harmonization_phrase_suggestion_request')
|
8842
|
-
end
|
8843
|
-
|
8844
8846
|
# Provides bulk upsert of items into an organization's catalog.
|
8845
8847
|
def ImportType.catalog_items
|
8846
8848
|
@@_catalog_items ||= ImportType.new('catalog_items')
|
8847
8849
|
end
|
8848
8850
|
|
8851
|
+
# Provides upload of customs descriptions for the products in a catalog.
|
8852
|
+
def ImportType.customs_descriptions
|
8853
|
+
@@_customs_descriptions ||= ImportType.new('customs_descriptions')
|
8854
|
+
end
|
8855
|
+
|
8849
8856
|
def to_hash
|
8850
8857
|
value
|
8851
8858
|
end
|
@@ -9852,6 +9859,44 @@ module Io
|
|
9852
9859
|
|
9853
9860
|
end
|
9854
9861
|
|
9862
|
+
class PaymentMethodRuleContentKey
|
9863
|
+
|
9864
|
+
attr_reader :value
|
9865
|
+
|
9866
|
+
def initialize(value)
|
9867
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9868
|
+
end
|
9869
|
+
|
9870
|
+
# Returns the instance of PaymentMethodRuleContentKey for this value, creating a new instance for an unknown value
|
9871
|
+
def PaymentMethodRuleContentKey.apply(value)
|
9872
|
+
if value.instance_of?(PaymentMethodRuleContentKey)
|
9873
|
+
value
|
9874
|
+
else
|
9875
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9876
|
+
value.nil? ? nil : (from_string(value) || PaymentMethodRuleContentKey.new(value))
|
9877
|
+
end
|
9878
|
+
end
|
9879
|
+
|
9880
|
+
# Returns the instance of PaymentMethodRuleContentKey for this value, or nil if not found
|
9881
|
+
def PaymentMethodRuleContentKey.from_string(value)
|
9882
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9883
|
+
PaymentMethodRuleContentKey.ALL.find { |v| v.value == value }
|
9884
|
+
end
|
9885
|
+
|
9886
|
+
def PaymentMethodRuleContentKey.ALL
|
9887
|
+
@@all ||= [PaymentMethodRuleContentKey.description]
|
9888
|
+
end
|
9889
|
+
|
9890
|
+
def PaymentMethodRuleContentKey.description
|
9891
|
+
@@_description ||= PaymentMethodRuleContentKey.new('description')
|
9892
|
+
end
|
9893
|
+
|
9894
|
+
def to_hash
|
9895
|
+
value
|
9896
|
+
end
|
9897
|
+
|
9898
|
+
end
|
9899
|
+
|
9855
9900
|
class PaymentMethodType
|
9856
9901
|
|
9857
9902
|
attr_reader :value
|
@@ -10488,23 +10533,54 @@ module Io
|
|
10488
10533
|
end
|
10489
10534
|
|
10490
10535
|
def ReversalErrorCode.ALL
|
10491
|
-
@@all ||= [ReversalErrorCode.authorization_declined, ReversalErrorCode.
|
10536
|
+
@@all ||= [ReversalErrorCode.amount_exceeds_balance, ReversalErrorCode.authorization_declined, ReversalErrorCode.authorization_expired, ReversalErrorCode.invalid_authorization, ReversalErrorCode.invalid_key, ReversalErrorCode.invalid_amount, ReversalErrorCode.invalid_currency, ReversalErrorCode.no_remaining_balance, ReversalErrorCode.partial_reversal_not_supported, ReversalErrorCode.unknown]
|
10537
|
+
end
|
10538
|
+
|
10539
|
+
# Amount specified exceeds the remaining authorization balance.
|
10540
|
+
def ReversalErrorCode.amount_exceeds_balance
|
10541
|
+
@@_amount_exceeds_balance ||= ReversalErrorCode.new('amount_exceeds_balance')
|
10492
10542
|
end
|
10493
10543
|
|
10494
|
-
# The authorization
|
10544
|
+
# The authorization was initially declined; there is nothing to reverse.
|
10495
10545
|
def ReversalErrorCode.authorization_declined
|
10496
10546
|
@@_authorization_declined ||= ReversalErrorCode.new('authorization_declined')
|
10497
10547
|
end
|
10498
10548
|
|
10499
|
-
# The authorization has
|
10500
|
-
def ReversalErrorCode.
|
10501
|
-
@@
|
10549
|
+
# The authorization has expired and can no longer be reversed.
|
10550
|
+
def ReversalErrorCode.authorization_expired
|
10551
|
+
@@_authorization_expired ||= ReversalErrorCode.new('authorization_expired')
|
10552
|
+
end
|
10553
|
+
|
10554
|
+
# The authorization was not found.
|
10555
|
+
def ReversalErrorCode.invalid_authorization
|
10556
|
+
@@_invalid_authorization ||= ReversalErrorCode.new('invalid_authorization')
|
10557
|
+
end
|
10558
|
+
|
10559
|
+
# Invalid key
|
10560
|
+
def ReversalErrorCode.invalid_key
|
10561
|
+
@@_invalid_key ||= ReversalErrorCode.new('invalid_key')
|
10562
|
+
end
|
10563
|
+
|
10564
|
+
# Amount is not valid - usually because amount was <= 0
|
10565
|
+
def ReversalErrorCode.invalid_amount
|
10566
|
+
@@_invalid_amount ||= ReversalErrorCode.new('invalid_amount')
|
10567
|
+
end
|
10568
|
+
|
10569
|
+
# Currency is either not known or invalid
|
10570
|
+
def ReversalErrorCode.invalid_currency
|
10571
|
+
@@_invalid_currency ||= ReversalErrorCode.new('invalid_currency')
|
10502
10572
|
end
|
10503
10573
|
|
10504
|
-
#
|
10505
|
-
#
|
10506
|
-
def ReversalErrorCode.
|
10507
|
-
@@
|
10574
|
+
# The authorization has already been fully captured and/or reversed - there are
|
10575
|
+
# no additional funds to reverse.
|
10576
|
+
def ReversalErrorCode.no_remaining_balance
|
10577
|
+
@@_no_remaining_balance ||= ReversalErrorCode.new('no_remaining_balance')
|
10578
|
+
end
|
10579
|
+
|
10580
|
+
# Indiciates a request for a partial reversal when the underlying processor does
|
10581
|
+
# not support it
|
10582
|
+
def ReversalErrorCode.partial_reversal_not_supported
|
10583
|
+
@@_partial_reversal_not_supported ||= ReversalErrorCode.new('partial_reversal_not_supported')
|
10508
10584
|
end
|
10509
10585
|
|
10510
10586
|
# Unknown or other
|
@@ -12912,7 +12988,7 @@ module Io
|
|
12912
12988
|
# authorization otherwise becomes unavailable (e.g. expires).
|
12913
12989
|
class Capture
|
12914
12990
|
|
12915
|
-
attr_reader :id, :key, :authorization, :amount, :currency, :created_at, :attributes
|
12991
|
+
attr_reader :id, :key, :authorization, :amount, :currency, :original, :created_at, :attributes
|
12916
12992
|
|
12917
12993
|
def initialize(incoming={})
|
12918
12994
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -12922,6 +12998,7 @@ module Io
|
|
12922
12998
|
@authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
|
12923
12999
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
12924
13000
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
13001
|
+
@original = (x = opts.delete(:original); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
|
12925
13002
|
@created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
|
12926
13003
|
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
|
12927
13004
|
end
|
@@ -12941,6 +13018,7 @@ module Io
|
|
12941
13018
|
:authorization => authorization.to_hash,
|
12942
13019
|
:amount => amount,
|
12943
13020
|
:currency => currency,
|
13021
|
+
:original => original.nil? ? nil : original.to_hash,
|
12944
13022
|
:created_at => created_at,
|
12945
13023
|
:attributes => attributes.nil? ? nil : attributes
|
12946
13024
|
}
|
@@ -21902,7 +21980,7 @@ module Io
|
|
21902
21980
|
# during this session (e.g. order).
|
21903
21981
|
class OrganizationSession < Session
|
21904
21982
|
|
21905
|
-
attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local
|
21983
|
+
attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local, :geo, :experience
|
21906
21984
|
|
21907
21985
|
def initialize(incoming={})
|
21908
21986
|
super(:discriminator => Session::Types::ORGANIZATION_SESSION)
|
@@ -21916,6 +21994,8 @@ module Io
|
|
21916
21994
|
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
21917
21995
|
@ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
21918
21996
|
@local = (x = opts.delete(:local); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalSession) ? x : ::Io::Flow::V0::Models::LocalSession.new(x)))
|
21997
|
+
@geo = (x = opts.delete(:geo); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionGeo) ? x : ::Io::Flow::V0::Models::SessionGeo.new(x)))
|
21998
|
+
@experience = (x = opts.delete(:experience); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceGeo) ? x : ::Io::Flow::V0::Models::ExperienceGeo.new(x)))
|
21919
21999
|
end
|
21920
22000
|
|
21921
22001
|
def to_json
|
@@ -21935,7 +22015,9 @@ module Io
|
|
21935
22015
|
:environment => environment.value,
|
21936
22016
|
:attributes => attributes,
|
21937
22017
|
:ip => ip,
|
21938
|
-
:local => local.nil? ? nil : local.to_hash
|
22018
|
+
:local => local.nil? ? nil : local.to_hash,
|
22019
|
+
:geo => geo.nil? ? nil : geo.to_hash,
|
22020
|
+
:experience => experience.nil? ? nil : experience.to_hash
|
21939
22021
|
}
|
21940
22022
|
end
|
21941
22023
|
|
@@ -22650,7 +22732,7 @@ module Io
|
|
22650
22732
|
|
22651
22733
|
class PaymentMethodRule
|
22652
22734
|
|
22653
|
-
attr_reader :tags, :payment_method, :display_position
|
22735
|
+
attr_reader :tags, :payment_method, :display_position, :content
|
22654
22736
|
|
22655
22737
|
def initialize(incoming={})
|
22656
22738
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -22658,6 +22740,7 @@ module Io
|
|
22658
22740
|
@tags = HttpClient::Preconditions.assert_class('tags', opts.delete(:tags), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodTag) ? x : ::Io::Flow::V0::Models::PaymentMethodTag.from_json(x)) }
|
22659
22741
|
@payment_method = (x = opts.delete(:payment_method); x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x))
|
22660
22742
|
@display_position = HttpClient::Preconditions.assert_class('display_position', opts.delete(:display_position), Integer)
|
22743
|
+
@content = (x = opts.delete(:content); x.nil? ? nil : HttpClient::Preconditions.assert_class('content', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodRuleContent) ? x : ::Io::Flow::V0::Models::PaymentMethodRuleContent.new(x)) })
|
22661
22744
|
end
|
22662
22745
|
|
22663
22746
|
def to_json
|
@@ -22672,7 +22755,36 @@ module Io
|
|
22672
22755
|
{
|
22673
22756
|
:tags => tags.map { |o| o.to_hash },
|
22674
22757
|
:payment_method => payment_method.to_hash,
|
22675
|
-
:display_position => display_position
|
22758
|
+
:display_position => display_position,
|
22759
|
+
:content => content.nil? ? nil : content.map { |o| o.to_hash }
|
22760
|
+
}
|
22761
|
+
end
|
22762
|
+
|
22763
|
+
end
|
22764
|
+
|
22765
|
+
class PaymentMethodRuleContent
|
22766
|
+
|
22767
|
+
attr_reader :key, :value
|
22768
|
+
|
22769
|
+
def initialize(incoming={})
|
22770
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22771
|
+
HttpClient::Preconditions.require_keys(opts, [:key, :value], 'PaymentMethodRuleContent')
|
22772
|
+
@key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::PaymentMethodRuleContentKey) ? x : ::Io::Flow::V0::Models::PaymentMethodRuleContentKey.apply(x))
|
22773
|
+
@value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String)
|
22774
|
+
end
|
22775
|
+
|
22776
|
+
def to_json
|
22777
|
+
JSON.dump(to_hash)
|
22778
|
+
end
|
22779
|
+
|
22780
|
+
def copy(incoming={})
|
22781
|
+
PaymentMethodRuleContent.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
22782
|
+
end
|
22783
|
+
|
22784
|
+
def to_hash
|
22785
|
+
{
|
22786
|
+
:key => key.value,
|
22787
|
+
:value => value
|
22676
22788
|
}
|
22677
22789
|
end
|
22678
22790
|
|
@@ -24848,17 +24960,18 @@ module Io
|
|
24848
24960
|
# A reversal is used to clear an authorization (full or partial).
|
24849
24961
|
class Reversal
|
24850
24962
|
|
24851
|
-
attr_reader :id, :key, :authorization, :status, :amount, :currency, :created_at, :attributes
|
24963
|
+
attr_reader :id, :key, :authorization, :status, :amount, :currency, :original, :created_at, :attributes
|
24852
24964
|
|
24853
24965
|
def initialize(incoming={})
|
24854
24966
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
24855
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :key, :authorization, :status, :amount, :currency, :created_at, :attributes], 'Reversal')
|
24967
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :authorization, :status, :amount, :currency, :original, :created_at, :attributes], 'Reversal')
|
24856
24968
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
24857
24969
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
24858
24970
|
@authorization = (x = opts.delete(:authorization); x.is_a?(::Io::Flow::V0::Models::AuthorizationReference) ? x : ::Io::Flow::V0::Models::AuthorizationReference.new(x))
|
24859
24971
|
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ReversalStatus) ? x : ::Io::Flow::V0::Models::ReversalStatus.apply(x))
|
24860
24972
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
24861
24973
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
24974
|
+
@original = (x = opts.delete(:original); x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))
|
24862
24975
|
@created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
|
24863
24976
|
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
24864
24977
|
end
|
@@ -24879,6 +24992,7 @@ module Io
|
|
24879
24992
|
:status => status.value,
|
24880
24993
|
:amount => amount,
|
24881
24994
|
:currency => currency,
|
24995
|
+
:original => original.to_hash,
|
24882
24996
|
:created_at => created_at,
|
24883
24997
|
:attributes => attributes
|
24884
24998
|
}
|
@@ -24886,15 +25000,17 @@ module Io
|
|
24886
25000
|
|
24887
25001
|
end
|
24888
25002
|
|
25003
|
+
# Details for why a reversal could not be created
|
24889
25004
|
class ReversalError
|
24890
25005
|
|
24891
|
-
attr_reader :code, :messages
|
25006
|
+
attr_reader :code, :messages, :codes
|
24892
25007
|
|
24893
25008
|
def initialize(incoming={})
|
24894
25009
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
24895
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
24896
|
-
@code = (x = opts.delete(:code); x.
|
25010
|
+
HttpClient::Preconditions.require_keys(opts, [:messages, :codes], 'ReversalError')
|
25011
|
+
@code = HttpClient::Preconditions.assert_class('code', (x = opts.delete(:code); x.nil? ? "reversal_error" : x), String)
|
24897
25012
|
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
25013
|
+
@codes = HttpClient::Preconditions.assert_class('codes', opts.delete(:codes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReversalErrorCode) ? x : ::Io::Flow::V0::Models::ReversalErrorCode.apply(x)) }
|
24898
25014
|
end
|
24899
25015
|
|
24900
25016
|
def to_json
|
@@ -24907,8 +25023,9 @@ module Io
|
|
24907
25023
|
|
24908
25024
|
def to_hash
|
24909
25025
|
{
|
24910
|
-
:code => code
|
24911
|
-
:messages => messages
|
25026
|
+
:code => code,
|
25027
|
+
:messages => messages,
|
25028
|
+
:codes => codes.map { |o| o.value }
|
24912
25029
|
}
|
24913
25030
|
end
|
24914
25031
|
|
@@ -24980,6 +25097,41 @@ module Io
|
|
24980
25097
|
|
24981
25098
|
end
|
24982
25099
|
|
25100
|
+
class ReversalUpserted < Event
|
25101
|
+
|
25102
|
+
attr_reader :event_id, :timestamp, :organization, :id, :reversal
|
25103
|
+
|
25104
|
+
def initialize(incoming={})
|
25105
|
+
super(:discriminator => Event::Types::REVERSAL_UPSERTED)
|
25106
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25107
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :reversal], 'ReversalUpserted')
|
25108
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
25109
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
25110
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
25111
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
25112
|
+
@reversal = (x = opts.delete(:reversal); x.is_a?(::Io::Flow::V0::Models::Reversal) ? x : ::Io::Flow::V0::Models::Reversal.new(x))
|
25113
|
+
end
|
25114
|
+
|
25115
|
+
def to_json
|
25116
|
+
JSON.dump(to_hash)
|
25117
|
+
end
|
25118
|
+
|
25119
|
+
def copy(incoming={})
|
25120
|
+
ReversalUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
25121
|
+
end
|
25122
|
+
|
25123
|
+
def subtype_to_hash
|
25124
|
+
{
|
25125
|
+
:event_id => event_id,
|
25126
|
+
:timestamp => timestamp,
|
25127
|
+
:organization => organization,
|
25128
|
+
:id => id,
|
25129
|
+
:reversal => reversal.to_hash
|
25130
|
+
}
|
25131
|
+
end
|
25132
|
+
|
25133
|
+
end
|
25134
|
+
|
24983
25135
|
class ReversalVersion
|
24984
25136
|
|
24985
25137
|
attr_reader :id, :timestamp, :type, :reversal
|
@@ -25368,6 +25520,39 @@ module Io
|
|
25368
25520
|
|
25369
25521
|
end
|
25370
25522
|
|
25523
|
+
# The geolocated information for this session
|
25524
|
+
class SessionGeo
|
25525
|
+
|
25526
|
+
attr_reader :country, :currency, :language, :locale
|
25527
|
+
|
25528
|
+
def initialize(incoming={})
|
25529
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25530
|
+
HttpClient::Preconditions.require_keys(opts, [:country, :currency, :language, :locale], 'SessionGeo')
|
25531
|
+
@country = (x = opts.delete(:country); x.is_a?(::Io::Flow::V0::Models::Country) ? x : ::Io::Flow::V0::Models::Country.new(x))
|
25532
|
+
@currency = (x = opts.delete(:currency); x.is_a?(::Io::Flow::V0::Models::Currency) ? x : ::Io::Flow::V0::Models::Currency.new(x))
|
25533
|
+
@language = (x = opts.delete(:language); x.is_a?(::Io::Flow::V0::Models::Language) ? x : ::Io::Flow::V0::Models::Language.new(x))
|
25534
|
+
@locale = (x = opts.delete(:locale); x.is_a?(::Io::Flow::V0::Models::Locale) ? x : ::Io::Flow::V0::Models::Locale.new(x))
|
25535
|
+
end
|
25536
|
+
|
25537
|
+
def to_json
|
25538
|
+
JSON.dump(to_hash)
|
25539
|
+
end
|
25540
|
+
|
25541
|
+
def copy(incoming={})
|
25542
|
+
SessionGeo.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
25543
|
+
end
|
25544
|
+
|
25545
|
+
def to_hash
|
25546
|
+
{
|
25547
|
+
:country => country.to_hash,
|
25548
|
+
:currency => currency.to_hash,
|
25549
|
+
:language => language.to_hash,
|
25550
|
+
:locale => locale.to_hash
|
25551
|
+
}
|
25552
|
+
end
|
25553
|
+
|
25554
|
+
end
|
25555
|
+
|
25371
25556
|
class SessionPutForm
|
25372
25557
|
|
25373
25558
|
attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes
|
@@ -27970,76 +28155,6 @@ module Io
|
|
27970
28155
|
|
27971
28156
|
end
|
27972
28157
|
|
27973
|
-
# Represents online payment through UnionPay
|
27974
|
-
class UnionpayAuthorizationDetails < OnlineAuthorizationDetails
|
27975
|
-
|
27976
|
-
attr_reader :id, :payment_redirect_url
|
27977
|
-
|
27978
|
-
def initialize(incoming={})
|
27979
|
-
super(:discriminator => OnlineAuthorizationDetails::Types::UNIONPAY_AUTHORIZATION_DETAILS)
|
27980
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27981
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :payment_redirect_url], 'UnionpayAuthorizationDetails')
|
27982
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
27983
|
-
@payment_redirect_url = HttpClient::Preconditions.assert_class('payment_redirect_url', opts.delete(:payment_redirect_url), String)
|
27984
|
-
end
|
27985
|
-
|
27986
|
-
def to_json
|
27987
|
-
JSON.dump(to_hash)
|
27988
|
-
end
|
27989
|
-
|
27990
|
-
def copy(incoming={})
|
27991
|
-
UnionpayAuthorizationDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
27992
|
-
end
|
27993
|
-
|
27994
|
-
def subtype_to_hash
|
27995
|
-
{
|
27996
|
-
:id => id,
|
27997
|
-
:payment_redirect_url => payment_redirect_url
|
27998
|
-
}
|
27999
|
-
end
|
28000
|
-
|
28001
|
-
end
|
28002
|
-
|
28003
|
-
# Executes the UnionPay payment
|
28004
|
-
class UnionpayAuthorizationForm < AuthorizationForm
|
28005
|
-
|
28006
|
-
attr_reader :order_number, :amount, :currency, :post_payment_redirect_urls, :key, :attributes, :ip
|
28007
|
-
|
28008
|
-
def initialize(incoming={})
|
28009
|
-
super(:discriminator => AuthorizationForm::Types::UNIONPAY_AUTHORIZATION_FORM)
|
28010
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28011
|
-
HttpClient::Preconditions.require_keys(opts, [:order_number, :amount, :currency, :post_payment_redirect_urls], 'UnionpayAuthorizationForm')
|
28012
|
-
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
28013
|
-
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
28014
|
-
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
28015
|
-
@post_payment_redirect_urls = (x = opts.delete(:post_payment_redirect_urls); x.is_a?(::Io::Flow::V0::Models::PostPaymentRedirectUrls) ? x : ::Io::Flow::V0::Models::PostPaymentRedirectUrls.new(x))
|
28016
|
-
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
28017
|
-
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
|
28018
|
-
@ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
28019
|
-
end
|
28020
|
-
|
28021
|
-
def to_json
|
28022
|
-
JSON.dump(to_hash)
|
28023
|
-
end
|
28024
|
-
|
28025
|
-
def copy(incoming={})
|
28026
|
-
UnionpayAuthorizationForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
28027
|
-
end
|
28028
|
-
|
28029
|
-
def subtype_to_hash
|
28030
|
-
{
|
28031
|
-
:order_number => order_number,
|
28032
|
-
:amount => amount,
|
28033
|
-
:currency => currency,
|
28034
|
-
:post_payment_redirect_urls => post_payment_redirect_urls.to_hash,
|
28035
|
-
:key => key,
|
28036
|
-
:attributes => attributes.nil? ? nil : attributes,
|
28037
|
-
:ip => ip
|
28038
|
-
}
|
28039
|
-
end
|
28040
|
-
|
28041
|
-
end
|
28042
|
-
|
28043
28158
|
# Provides the ability to upload a file to a URL (an expiring s3 url, usually
|
28044
28159
|
# valid for 1 week)
|
28045
28160
|
class Upload
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flow Commerce, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|