Class: Io::Flow::V0::Models::ShopifyMerchantApplicationPutForm

Inherits:
MerchantApplicationPutForm show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from MerchantApplicationPutForm

#discriminator

Instance Method Summary collapse

Methods inherited from MerchantApplicationPutForm

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ShopifyMerchantApplicationPutForm

Returns a new instance of ShopifyMerchantApplicationPutForm.



68076
68077
68078
68079
68080
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68076

def initialize(incoming={})
  super(:discriminator => MerchantApplicationPutForm::Types::SHOPIFY_MERCHANT_APPLICATION_PUT_FORM)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @status = (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OnboardingApplicationStatus) ? x : ::Io::Flow::V0::Models::OnboardingApplicationStatus.apply(x)))
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



68074
68075
68076
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68074

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



68086
68087
68088
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68086

def copy(incoming={})
  ShopifyMerchantApplicationPutForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



68090
68091
68092
68093
68094
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68090

def subtype_to_hash
  {
    :status => status.nil? ? nil : status.value
  }
end

#to_jsonObject



68082
68083
68084
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68082

def to_json
  JSON.dump(to_hash)
end