Class: Io::Flow::V0::Models::ShopifyMerchantApplication
- Inherits:
-
MerchantApplication
- Object
- MerchantApplication
- Io::Flow::V0::Models::ShopifyMerchantApplication
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#aba_routing_transit_number ⇒ Object
readonly
Returns the value of attribute aba_routing_transit_number.
-
#activated_at ⇒ Object
readonly
Returns the value of attribute activated_at.
-
#average_order_value ⇒ Object
readonly
Returns the value of attribute average_order_value.
-
#average_order_weight ⇒ Object
readonly
Returns the value of attribute average_order_weight.
-
#bank_account_number ⇒ Object
readonly
Returns the value of attribute bank_account_number.
-
#beneficiary ⇒ Object
readonly
Returns the value of attribute beneficiary.
-
#business_address ⇒ Object
readonly
Returns the value of attribute business_address.
-
#business_description ⇒ Object
readonly
Returns the value of attribute business_description.
-
#business_url ⇒ Object
readonly
Returns the value of attribute business_url.
-
#chargeback_percentage ⇒ Object
readonly
Returns the value of attribute chargeback_percentage.
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#dangerous_goods ⇒ Object
readonly
Returns the value of attribute dangerous_goods.
-
#default_country_of_origin ⇒ Object
readonly
Returns the value of attribute default_country_of_origin.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#indirect_tax ⇒ Object
readonly
Returns the value of attribute indirect_tax.
-
#last_month_xborder_gmv ⇒ Object
readonly
Returns the value of attribute last_month_xborder_gmv.
-
#last_year_xborder_gmv ⇒ Object
readonly
Returns the value of attribute last_year_xborder_gmv.
-
#logistics_format ⇒ Object
readonly
Returns the value of attribute logistics_format.
-
#monthly_average ⇒ Object
readonly
Returns the value of attribute monthly_average.
-
#organization_id ⇒ Object
readonly
Returns the value of attribute organization_id.
-
#organization_reference ⇒ Object
readonly
Returns the value of attribute organization_reference.
-
#other_trade_sector ⇒ Object
readonly
Returns the value of attribute other_trade_sector.
-
#package_dimensions ⇒ Object
readonly
Returns the value of attribute package_dimensions.
-
#parent_company ⇒ Object
readonly
Returns the value of attribute parent_company.
-
#rate_card ⇒ Object
readonly
Returns the value of attribute rate_card.
-
#ratecard ⇒ Object
readonly
Returns the value of attribute ratecard.
-
#refund_percentage ⇒ Object
readonly
Returns the value of attribute refund_percentage.
-
#shop ⇒ Object
readonly
Returns the value of attribute shop.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_updated_at ⇒ Object
readonly
Returns the value of attribute status_updated_at.
-
#third_party_logistics_partners ⇒ Object
readonly
Returns the value of attribute third_party_logistics_partners.
-
#trade_sectors ⇒ Object
readonly
Returns the value of attribute trade_sectors.
-
#ultimate_beneficiary_owner ⇒ Object
readonly
Returns the value of attribute ultimate_beneficiary_owner.
Attributes inherited from MerchantApplication
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShopifyMerchantApplication
constructor
A new instance of ShopifyMerchantApplication.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from MerchantApplication
Constructor Details
#initialize(incoming = {}) ⇒ ShopifyMerchantApplication
Returns a new instance of ShopifyMerchantApplication.
67900 67901 67902 67903 67904 67905 67906 67907 67908 67909 67910 67911 67912 67913 67914 67915 67916 67917 67918 67919 67920 67921 67922 67923 67924 67925 67926 67927 67928 67929 67930 67931 67932 67933 67934 67935 67936 67937 67938 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67900 def initialize(incoming={}) super(:discriminator => MerchantApplication::Types::SHOPIFY_MERCHANT_APPLICATION) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :organization_id, :organization_reference, :status, :rate_card, :created_at], 'ShopifyMerchantApplication') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String) @organization_reference = (x = opts.delete(:organization_reference); x.is_a?(::Io::Flow::V0::Models::OnboardingOrganizationReference) ? x : ::Io::Flow::V0::Models::OnboardingOrganizationReference.new(x)) @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::OnboardingApplicationStatus) ? x : ::Io::Flow::V0::Models::OnboardingApplicationStatus.apply(x)) @company = (x = opts.delete(:company); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::MerchantInfo) ? x : ::Io::Flow::V0::Models::MerchantInfo.new(x))) @indirect_tax = (x = opts.delete(:indirect_tax); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::IndirectTax) ? x : ::Io::Flow::V0::Models::IndirectTax.new(x))) @parent_company = (x = opts.delete(:parent_company); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::MerchantInfo) ? x : ::Io::Flow::V0::Models::MerchantInfo.new(x))) @beneficiary = (x = opts.delete(:beneficiary); x.nil? ? nil : HttpClient::Preconditions.assert_class('beneficiary', x, String)) @ultimate_beneficiary_owner = (x = opts.delete(:ultimate_beneficiary_owner); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::UltimateBeneficiaryOwner) ? x : ::Io::Flow::V0::Models::UltimateBeneficiaryOwner.new(x))) @business_url = (x = opts.delete(:business_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('business_url', x, String)) @business_description = (x = opts.delete(:business_description); x.nil? ? nil : HttpClient::Preconditions.assert_class('business_description', x, String)) @business_address = (x = opts.delete(:business_address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))) @refund_percentage = (x = opts.delete(:refund_percentage); x.nil? ? nil : HttpClient::Preconditions.assert_class('refund_percentage', HttpClient::Helper.to_big_decimal(x), BigDecimal)) @chargeback_percentage = (x = opts.delete(:chargeback_percentage); x.nil? ? nil : HttpClient::Preconditions.assert_class('chargeback_percentage', HttpClient::Helper.to_big_decimal(x), BigDecimal)) @bank_account_number = (x = opts.delete(:bank_account_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('bank_account_number', x, String)) @aba_routing_transit_number = (x = opts.delete(:aba_routing_transit_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('aba_routing_transit_number', x, String)) @trade_sectors = (x = opts.delete(:trade_sectors); x.nil? ? nil : HttpClient::Preconditions.assert_class('trade_sectors', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OnboardingTradeSector) ? x : ::Io::Flow::V0::Models::OnboardingTradeSector.apply(x)) }) @other_trade_sector = (x = opts.delete(:other_trade_sector); x.nil? ? nil : HttpClient::Preconditions.assert_class('other_trade_sector', x, String)) @third_party_logistics_partners = (x = opts.delete(:third_party_logistics_partners); x.nil? ? nil : HttpClient::Preconditions.assert_class('third_party_logistics_partners', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ThirdPartyLogisticsPartner) ? x : ::Io::Flow::V0::Models::ThirdPartyLogisticsPartner.new(x)) }) @average_order_weight = (x = opts.delete(:average_order_weight); x.nil? ? nil : HttpClient::Preconditions.assert_class('average_order_weight', HttpClient::Helper.to_big_decimal(x), BigDecimal)) @package_dimensions = (x = opts.delete(:package_dimensions); x.nil? ? nil : HttpClient::Preconditions.assert_class('package_dimensions', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Dimension) ? x : ::Io::Flow::V0::Models::Dimension.new(x)) }) @monthly_average = (x = opts.delete(:monthly_average); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::MonthlyAverage) ? x : ::Io::Flow::V0::Models::MonthlyAverage.new(x))) @dangerous_goods = (x = opts.delete(:dangerous_goods); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('dangerous_goods', x)) @default_country_of_origin = (x = opts.delete(:default_country_of_origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_country_of_origin', x, String)) @ratecard = (x = opts.delete(:ratecard); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::RatecardReference) ? x : ::Io::Flow::V0::Models::RatecardReference.new(x))) @rate_card = HttpClient::Preconditions.assert_class('rate_card', opts.delete(:rate_card), String) @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime) @activated_at = (x = opts.delete(:activated_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('activated_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @status_updated_at = (x = opts.delete(:status_updated_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('status_updated_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @logistics_format = (x = opts.delete(:logistics_format); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LogisticsFormat) ? x : ::Io::Flow::V0::Models::LogisticsFormat.new(x))) @shop = (x = opts.delete(:shop); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Shop) ? x : ::Io::Flow::V0::Models::Shop.new(x))) @last_year_xborder_gmv = (x = opts.delete(:last_year_xborder_gmv); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))) @last_month_xborder_gmv = (x = opts.delete(:last_month_xborder_gmv); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))) @average_order_value = (x = opts.delete(:average_order_value); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x))) end |
Instance Attribute Details
#aba_routing_transit_number ⇒ Object (readonly)
Returns the value of attribute aba_routing_transit_number.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def aba_routing_transit_number @aba_routing_transit_number end |
#activated_at ⇒ Object (readonly)
Returns the value of attribute activated_at.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def activated_at @activated_at end |
#average_order_value ⇒ Object (readonly)
Returns the value of attribute average_order_value.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def average_order_value @average_order_value end |
#average_order_weight ⇒ Object (readonly)
Returns the value of attribute average_order_weight.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def average_order_weight @average_order_weight end |
#bank_account_number ⇒ Object (readonly)
Returns the value of attribute bank_account_number.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def bank_account_number @bank_account_number end |
#beneficiary ⇒ Object (readonly)
Returns the value of attribute beneficiary.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def beneficiary @beneficiary end |
#business_address ⇒ Object (readonly)
Returns the value of attribute business_address.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def business_address @business_address end |
#business_description ⇒ Object (readonly)
Returns the value of attribute business_description.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def business_description @business_description end |
#business_url ⇒ Object (readonly)
Returns the value of attribute business_url.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def business_url @business_url end |
#chargeback_percentage ⇒ Object (readonly)
Returns the value of attribute chargeback_percentage.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def chargeback_percentage @chargeback_percentage end |
#company ⇒ Object (readonly)
Returns the value of attribute company.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def company @company end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def created_at @created_at end |
#dangerous_goods ⇒ Object (readonly)
Returns the value of attribute dangerous_goods.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def dangerous_goods @dangerous_goods end |
#default_country_of_origin ⇒ Object (readonly)
Returns the value of attribute default_country_of_origin.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def default_country_of_origin @default_country_of_origin end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def id @id end |
#indirect_tax ⇒ Object (readonly)
Returns the value of attribute indirect_tax.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def indirect_tax @indirect_tax end |
#last_month_xborder_gmv ⇒ Object (readonly)
Returns the value of attribute last_month_xborder_gmv.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def last_month_xborder_gmv @last_month_xborder_gmv end |
#last_year_xborder_gmv ⇒ Object (readonly)
Returns the value of attribute last_year_xborder_gmv.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def last_year_xborder_gmv @last_year_xborder_gmv end |
#logistics_format ⇒ Object (readonly)
Returns the value of attribute logistics_format.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def logistics_format @logistics_format end |
#monthly_average ⇒ Object (readonly)
Returns the value of attribute monthly_average.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def monthly_average @monthly_average end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def organization_id @organization_id end |
#organization_reference ⇒ Object (readonly)
Returns the value of attribute organization_reference.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def organization_reference @organization_reference end |
#other_trade_sector ⇒ Object (readonly)
Returns the value of attribute other_trade_sector.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def other_trade_sector @other_trade_sector end |
#package_dimensions ⇒ Object (readonly)
Returns the value of attribute package_dimensions.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def package_dimensions @package_dimensions end |
#parent_company ⇒ Object (readonly)
Returns the value of attribute parent_company.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def parent_company @parent_company end |
#rate_card ⇒ Object (readonly)
Returns the value of attribute rate_card.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def rate_card @rate_card end |
#ratecard ⇒ Object (readonly)
Returns the value of attribute ratecard.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def ratecard @ratecard end |
#refund_percentage ⇒ Object (readonly)
Returns the value of attribute refund_percentage.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def refund_percentage @refund_percentage end |
#shop ⇒ Object (readonly)
Returns the value of attribute shop.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def shop @shop end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def status @status end |
#status_updated_at ⇒ Object (readonly)
Returns the value of attribute status_updated_at.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def status_updated_at @status_updated_at end |
#third_party_logistics_partners ⇒ Object (readonly)
Returns the value of attribute third_party_logistics_partners.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def third_party_logistics_partners @third_party_logistics_partners end |
#trade_sectors ⇒ Object (readonly)
Returns the value of attribute trade_sectors.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def trade_sectors @trade_sectors end |
#ultimate_beneficiary_owner ⇒ Object (readonly)
Returns the value of attribute ultimate_beneficiary_owner.
67898 67899 67900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67898 def ultimate_beneficiary_owner @ultimate_beneficiary_owner end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
67944 67945 67946 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67944 def copy(incoming={}) ShopifyMerchantApplication.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
67948 67949 67950 67951 67952 67953 67954 67955 67956 67957 67958 67959 67960 67961 67962 67963 67964 67965 67966 67967 67968 67969 67970 67971 67972 67973 67974 67975 67976 67977 67978 67979 67980 67981 67982 67983 67984 67985 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67948 def subtype_to_hash { :id => id, :organization_id => organization_id, :organization_reference => organization_reference.to_hash, :status => status.value, :company => company.nil? ? nil : company.to_hash, :indirect_tax => indirect_tax.nil? ? nil : indirect_tax.to_hash, :parent_company => parent_company.nil? ? nil : parent_company.to_hash, :beneficiary => beneficiary, :ultimate_beneficiary_owner => ultimate_beneficiary_owner.nil? ? nil : ultimate_beneficiary_owner.to_hash, :business_url => business_url, :business_description => business_description, :business_address => business_address.nil? ? nil : business_address.to_hash, :refund_percentage => refund_percentage.to_f.to_s, :chargeback_percentage => chargeback_percentage.to_f.to_s, :bank_account_number => bank_account_number, :aba_routing_transit_number => aba_routing_transit_number, :trade_sectors => trade_sectors.nil? ? nil : trade_sectors.map { |o| o.value }, :other_trade_sector => other_trade_sector, :third_party_logistics_partners => third_party_logistics_partners.nil? ? nil : third_party_logistics_partners.map { |o| o.to_hash }, :average_order_weight => average_order_weight.to_f.to_s, :package_dimensions => package_dimensions.nil? ? nil : package_dimensions.map { |o| o.to_hash }, :monthly_average => monthly_average.nil? ? nil : monthly_average.to_hash, :dangerous_goods => dangerous_goods, :default_country_of_origin => default_country_of_origin, :ratecard => ratecard.nil? ? nil : ratecard.to_hash, :rate_card => rate_card, :created_at => created_at, :activated_at => activated_at, :status_updated_at => status_updated_at, :logistics_format => logistics_format.nil? ? nil : logistics_format.to_hash, :shop => shop.nil? ? nil : shop.to_hash, :last_year_xborder_gmv => last_year_xborder_gmv.nil? ? nil : last_year_xborder_gmv.to_hash, :last_month_xborder_gmv => last_month_xborder_gmv.nil? ? nil : last_month_xborder_gmv.to_hash, :average_order_value => average_order_value.nil? ? nil : average_order_value.to_hash } end |
#to_json ⇒ Object
67940 67941 67942 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67940 def to_json JSON.dump(to_hash) end |