mundi_api 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/LICENSE +28 -0
 - data/README.md +2186 -0
 - data/lib/mundi_api.rb +137 -0
 - data/lib/mundi_api/api_helper.rb +209 -0
 - data/lib/mundi_api/configuration.rb +25 -0
 - data/lib/mundi_api/controllers/base_controller.rb +61 -0
 - data/lib/mundi_api/controllers/charges_controller.rb +359 -0
 - data/lib/mundi_api/controllers/customers_controller.rb +758 -0
 - data/lib/mundi_api/controllers/invoices_controller.rb +184 -0
 - data/lib/mundi_api/controllers/orders_controller.rb +171 -0
 - data/lib/mundi_api/controllers/plans_controller.rb +387 -0
 - data/lib/mundi_api/controllers/subscriptions_controller.rb +648 -0
 - data/lib/mundi_api/controllers/tokens_controller.rb +87 -0
 - data/lib/mundi_api/exceptions/api_exception.rb +18 -0
 - data/lib/mundi_api/exceptions/error_exception.rb +37 -0
 - data/lib/mundi_api/http/auth/basic_auth.rb +20 -0
 - data/lib/mundi_api/http/faraday_client.rb +55 -0
 - data/lib/mundi_api/http/http_call_back.rb +22 -0
 - data/lib/mundi_api/http/http_client.rb +92 -0
 - data/lib/mundi_api/http/http_context.rb +18 -0
 - data/lib/mundi_api/http/http_method_enum.rb +11 -0
 - data/lib/mundi_api/http/http_request.rb +48 -0
 - data/lib/mundi_api/http/http_response.rb +21 -0
 - data/lib/mundi_api/models/base_model.rb +34 -0
 - data/lib/mundi_api/models/create_access_token_request.rb +35 -0
 - data/lib/mundi_api/models/create_address_request.rb +108 -0
 - data/lib/mundi_api/models/create_bank_transfer_payment_request.rb +44 -0
 - data/lib/mundi_api/models/create_boleto_payment_request.rb +83 -0
 - data/lib/mundi_api/models/create_cancel_charge_request.rb +35 -0
 - data/lib/mundi_api/models/create_cancel_subscription_request.rb +35 -0
 - data/lib/mundi_api/models/create_capture_charge_request.rb +45 -0
 - data/lib/mundi_api/models/create_card_options_request.rb +36 -0
 - data/lib/mundi_api/models/create_card_request.rb +136 -0
 - data/lib/mundi_api/models/create_card_token_request.rb +80 -0
 - data/lib/mundi_api/models/create_charge_request.rb +92 -0
 - data/lib/mundi_api/models/create_checkout_boleto_payment_request.rb +54 -0
 - data/lib/mundi_api/models/create_checkout_card_installment_option_request.rb +44 -0
 - data/lib/mundi_api/models/create_checkout_card_payment_request.rb +51 -0
 - data/lib/mundi_api/models/create_checkout_payment_request.rb +82 -0
 - data/lib/mundi_api/models/create_credit_card_payment_request.rb +108 -0
 - data/lib/mundi_api/models/create_customer_request.rb +108 -0
 - data/lib/mundi_api/models/create_discount_request.rb +62 -0
 - data/lib/mundi_api/models/create_order_item_request.rb +71 -0
 - data/lib/mundi_api/models/create_order_request.rb +114 -0
 - data/lib/mundi_api/models/create_payment_request.rb +121 -0
 - data/lib/mundi_api/models/create_phone_request.rb +53 -0
 - data/lib/mundi_api/models/create_phones_request.rb +46 -0
 - data/lib/mundi_api/models/create_plan_item_request.rb +81 -0
 - data/lib/mundi_api/models/create_plan_request.rb +199 -0
 - data/lib/mundi_api/models/create_price_bracket_request.rb +62 -0
 - data/lib/mundi_api/models/create_pricing_scheme_request.rb +69 -0
 - data/lib/mundi_api/models/create_seller_request.rb +90 -0
 - data/lib/mundi_api/models/create_setup_request.rb +55 -0
 - data/lib/mundi_api/models/create_shipping_request.rb +81 -0
 - data/lib/mundi_api/models/create_subscription_item_request.rb +106 -0
 - data/lib/mundi_api/models/create_subscription_request.rb +269 -0
 - data/lib/mundi_api/models/create_token_request.rb +44 -0
 - data/lib/mundi_api/models/create_usage_request.rb +54 -0
 - data/lib/mundi_api/models/create_voucher_payment_request.rb +72 -0
 - data/lib/mundi_api/models/get_access_token_response.rb +73 -0
 - data/lib/mundi_api/models/get_address_response.rb +163 -0
 - data/lib/mundi_api/models/get_bank_transfer_transaction_response.rb +118 -0
 - data/lib/mundi_api/models/get_billing_address_response.rb +98 -0
 - data/lib/mundi_api/models/get_boleto_transaction_response.rb +137 -0
 - data/lib/mundi_api/models/get_card_response.rb +164 -0
 - data/lib/mundi_api/models/get_card_token_response.rb +89 -0
 - data/lib/mundi_api/models/get_charge_response.rb +184 -0
 - data/lib/mundi_api/models/get_checkout_payment_settings_response.rb +99 -0
 - data/lib/mundi_api/models/get_credit_card_transaction_response.rb +163 -0
 - data/lib/mundi_api/models/get_customer_response.rb +145 -0
 - data/lib/mundi_api/models/get_discount_response.rb +100 -0
 - data/lib/mundi_api/models/get_invoice_item_response.rb +73 -0
 - data/lib/mundi_api/models/get_invoice_response.rb +210 -0
 - data/lib/mundi_api/models/get_order_item_response.rb +63 -0
 - data/lib/mundi_api/models/get_order_response.rb +167 -0
 - data/lib/mundi_api/models/get_period_response.rb +73 -0
 - data/lib/mundi_api/models/get_phone_response.rb +53 -0
 - data/lib/mundi_api/models/get_phones_response.rb +46 -0
 - data/lib/mundi_api/models/get_plan_item_response.rb +127 -0
 - data/lib/mundi_api/models/get_plan_response.rb +223 -0
 - data/lib/mundi_api/models/get_price_bracket_response.rb +62 -0
 - data/lib/mundi_api/models/get_pricing_scheme_response.rb +69 -0
 - data/lib/mundi_api/models/get_safety_pay_transaction_response.rb +109 -0
 - data/lib/mundi_api/models/get_seller_response.rb +126 -0
 - data/lib/mundi_api/models/get_setup_response.rb +62 -0
 - data/lib/mundi_api/models/get_shipping_response.rb +72 -0
 - data/lib/mundi_api/models/get_subscription_item_response.rb +135 -0
 - data/lib/mundi_api/models/get_subscription_response.rb +261 -0
 - data/lib/mundi_api/models/get_token_response.rb +72 -0
 - data/lib/mundi_api/models/get_transaction_response.rb +136 -0
 - data/lib/mundi_api/models/get_usage_response.rb +82 -0
 - data/lib/mundi_api/models/get_voucher_transaction_response.rb +163 -0
 - data/lib/mundi_api/models/list_access_tokens_response.rb +51 -0
 - data/lib/mundi_api/models/list_addresses_response.rb +51 -0
 - data/lib/mundi_api/models/list_cards_response.rb +51 -0
 - data/lib/mundi_api/models/list_charges_response.rb +51 -0
 - data/lib/mundi_api/models/list_customers_response.rb +51 -0
 - data/lib/mundi_api/models/list_invoices_response.rb +51 -0
 - data/lib/mundi_api/models/list_order_response.rb +51 -0
 - data/lib/mundi_api/models/list_plans_response.rb +51 -0
 - data/lib/mundi_api/models/list_subscription_items_response.rb +51 -0
 - data/lib/mundi_api/models/list_subscriptions_response.rb +51 -0
 - data/lib/mundi_api/models/list_transactions_response.rb +51 -0
 - data/lib/mundi_api/models/list_usages_response.rb +51 -0
 - data/lib/mundi_api/models/paging_response.rb +53 -0
 - data/lib/mundi_api/models/update_address_request.rb +53 -0
 - data/lib/mundi_api/models/update_card_request.rb +81 -0
 - data/lib/mundi_api/models/update_charge_card_request.rb +62 -0
 - data/lib/mundi_api/models/update_charge_due_date_request.rb +36 -0
 - data/lib/mundi_api/models/update_charge_payment_method_request.rb +74 -0
 - data/lib/mundi_api/models/update_customer_request.rb +90 -0
 - data/lib/mundi_api/models/update_metadata_request.rb +35 -0
 - data/lib/mundi_api/models/update_plan_item_request.rb +81 -0
 - data/lib/mundi_api/models/update_plan_request.rb +161 -0
 - data/lib/mundi_api/models/update_price_bracket_request.rb +62 -0
 - data/lib/mundi_api/models/update_pricing_scheme_request.rb +69 -0
 - data/lib/mundi_api/models/update_subscription_billing_date_request.rb +37 -0
 - data/lib/mundi_api/models/update_subscription_card_request.rb +44 -0
 - data/lib/mundi_api/models/update_subscription_item_request.rb +81 -0
 - data/lib/mundi_api/models/update_subscription_payment_method_request.rb +53 -0
 - data/lib/mundi_api/mundi_api_client.rb +63 -0
 - metadata +246 -0
 
| 
         @@ -0,0 +1,269 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This file was automatically generated by APIMATIC v2.0
         
     | 
| 
      
 2 
     | 
    
         
            +
            # ( https://apimatic.io ).
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 5 
     | 
    
         
            +
            module MundiApi
         
     | 
| 
      
 6 
     | 
    
         
            +
              # Request for creating a subcription
         
     | 
| 
      
 7 
     | 
    
         
            +
              class CreateSubscriptionRequest < BaseModel
         
     | 
| 
      
 8 
     | 
    
         
            +
                # Customer
         
     | 
| 
      
 9 
     | 
    
         
            +
                # @return [CreateCustomerRequest]
         
     | 
| 
      
 10 
     | 
    
         
            +
                attr_accessor :customer
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                # Card
         
     | 
| 
      
 13 
     | 
    
         
            +
                # @return [CreateCardRequest]
         
     | 
| 
      
 14 
     | 
    
         
            +
                attr_accessor :card
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                # Subscription code
         
     | 
| 
      
 17 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :code
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                # Payment method
         
     | 
| 
      
 21 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :payment_method
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                # Billing type
         
     | 
| 
      
 25 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :billing_type
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # Statement descriptor for credit card subscriptions
         
     | 
| 
      
 29 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 30 
     | 
    
         
            +
                attr_accessor :statement_descriptor
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                # Subscription description
         
     | 
| 
      
 33 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 34 
     | 
    
         
            +
                attr_accessor :description
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                # Currency
         
     | 
| 
      
 37 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 38 
     | 
    
         
            +
                attr_accessor :currency
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                # Interval
         
     | 
| 
      
 41 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 42 
     | 
    
         
            +
                attr_accessor :interval
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                # Interval count
         
     | 
| 
      
 45 
     | 
    
         
            +
                # @return [Integer]
         
     | 
| 
      
 46 
     | 
    
         
            +
                attr_accessor :interval_count
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                # Subscription pricing scheme
         
     | 
| 
      
 49 
     | 
    
         
            +
                # @return [CreatePricingSchemeRequest]
         
     | 
| 
      
 50 
     | 
    
         
            +
                attr_accessor :pricing_scheme
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                # Subscription items
         
     | 
| 
      
 53 
     | 
    
         
            +
                # @return [List of CreateSubscriptionItemRequest]
         
     | 
| 
      
 54 
     | 
    
         
            +
                attr_accessor :items
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                # Shipping
         
     | 
| 
      
 57 
     | 
    
         
            +
                # @return [CreateShippingRequest]
         
     | 
| 
      
 58 
     | 
    
         
            +
                attr_accessor :shipping
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                # Discounts
         
     | 
| 
      
 61 
     | 
    
         
            +
                # @return [List of CreateDiscountRequest]
         
     | 
| 
      
 62 
     | 
    
         
            +
                attr_accessor :discounts
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                # Metadata
         
     | 
| 
      
 65 
     | 
    
         
            +
                # @return [Array<String, String>]
         
     | 
| 
      
 66 
     | 
    
         
            +
                attr_accessor :metadata
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                # Setup data
         
     | 
| 
      
 69 
     | 
    
         
            +
                # @return [CreateSetupRequest]
         
     | 
| 
      
 70 
     | 
    
         
            +
                attr_accessor :setup
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                # Plan id
         
     | 
| 
      
 73 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 74 
     | 
    
         
            +
                attr_accessor :plan_id
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                # Customer id
         
     | 
| 
      
 77 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 78 
     | 
    
         
            +
                attr_accessor :customer_id
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                # Card id
         
     | 
| 
      
 81 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 82 
     | 
    
         
            +
                attr_accessor :card_id
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                # Billing day
         
     | 
| 
      
 85 
     | 
    
         
            +
                # @return [Integer]
         
     | 
| 
      
 86 
     | 
    
         
            +
                attr_accessor :billing_day
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                # Number of installments
         
     | 
| 
      
 89 
     | 
    
         
            +
                # @return [Integer]
         
     | 
| 
      
 90 
     | 
    
         
            +
                attr_accessor :installments
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
                # Subscription start date
         
     | 
| 
      
 93 
     | 
    
         
            +
                # @return [DateTime]
         
     | 
| 
      
 94 
     | 
    
         
            +
                attr_accessor :start_at
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                # Subscription minimum price
         
     | 
| 
      
 97 
     | 
    
         
            +
                # @return [Integer]
         
     | 
| 
      
 98 
     | 
    
         
            +
                attr_accessor :minimum_price
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
                # Number of cycles
         
     | 
| 
      
 101 
     | 
    
         
            +
                # @return [Integer]
         
     | 
| 
      
 102 
     | 
    
         
            +
                attr_accessor :cycles
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                # Card token
         
     | 
| 
      
 105 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 106 
     | 
    
         
            +
                attr_accessor :card_token
         
     | 
| 
      
 107 
     | 
    
         
            +
             
     | 
| 
      
 108 
     | 
    
         
            +
                # A mapping from model property names to API property names.
         
     | 
| 
      
 109 
     | 
    
         
            +
                def self.names
         
     | 
| 
      
 110 
     | 
    
         
            +
                  if @_hash.nil?
         
     | 
| 
      
 111 
     | 
    
         
            +
                    @_hash = {}
         
     | 
| 
      
 112 
     | 
    
         
            +
                    @_hash['customer'] = 'customer'
         
     | 
| 
      
 113 
     | 
    
         
            +
                    @_hash['card'] = 'card'
         
     | 
| 
      
 114 
     | 
    
         
            +
                    @_hash['code'] = 'code'
         
     | 
| 
      
 115 
     | 
    
         
            +
                    @_hash['payment_method'] = 'payment_method'
         
     | 
| 
      
 116 
     | 
    
         
            +
                    @_hash['billing_type'] = 'billing_type'
         
     | 
| 
      
 117 
     | 
    
         
            +
                    @_hash['statement_descriptor'] = 'statement_descriptor'
         
     | 
| 
      
 118 
     | 
    
         
            +
                    @_hash['description'] = 'description'
         
     | 
| 
      
 119 
     | 
    
         
            +
                    @_hash['currency'] = 'currency'
         
     | 
| 
      
 120 
     | 
    
         
            +
                    @_hash['interval'] = 'interval'
         
     | 
| 
      
 121 
     | 
    
         
            +
                    @_hash['interval_count'] = 'interval_count'
         
     | 
| 
      
 122 
     | 
    
         
            +
                    @_hash['pricing_scheme'] = 'pricing_scheme'
         
     | 
| 
      
 123 
     | 
    
         
            +
                    @_hash['items'] = 'items'
         
     | 
| 
      
 124 
     | 
    
         
            +
                    @_hash['shipping'] = 'shipping'
         
     | 
| 
      
 125 
     | 
    
         
            +
                    @_hash['discounts'] = 'discounts'
         
     | 
| 
      
 126 
     | 
    
         
            +
                    @_hash['metadata'] = 'metadata'
         
     | 
| 
      
 127 
     | 
    
         
            +
                    @_hash['setup'] = 'setup'
         
     | 
| 
      
 128 
     | 
    
         
            +
                    @_hash['plan_id'] = 'plan_id'
         
     | 
| 
      
 129 
     | 
    
         
            +
                    @_hash['customer_id'] = 'customer_id'
         
     | 
| 
      
 130 
     | 
    
         
            +
                    @_hash['card_id'] = 'card_id'
         
     | 
| 
      
 131 
     | 
    
         
            +
                    @_hash['billing_day'] = 'billing_day'
         
     | 
| 
      
 132 
     | 
    
         
            +
                    @_hash['installments'] = 'installments'
         
     | 
| 
      
 133 
     | 
    
         
            +
                    @_hash['start_at'] = 'start_at'
         
     | 
| 
      
 134 
     | 
    
         
            +
                    @_hash['minimum_price'] = 'minimum_price'
         
     | 
| 
      
 135 
     | 
    
         
            +
                    @_hash['cycles'] = 'cycles'
         
     | 
| 
      
 136 
     | 
    
         
            +
                    @_hash['card_token'] = 'card_token'
         
     | 
| 
      
 137 
     | 
    
         
            +
                  end
         
     | 
| 
      
 138 
     | 
    
         
            +
                  @_hash
         
     | 
| 
      
 139 
     | 
    
         
            +
                end
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
      
 141 
     | 
    
         
            +
                def initialize(customer = nil,
         
     | 
| 
      
 142 
     | 
    
         
            +
                               card = nil,
         
     | 
| 
      
 143 
     | 
    
         
            +
                               code = nil,
         
     | 
| 
      
 144 
     | 
    
         
            +
                               payment_method = nil,
         
     | 
| 
      
 145 
     | 
    
         
            +
                               billing_type = nil,
         
     | 
| 
      
 146 
     | 
    
         
            +
                               statement_descriptor = nil,
         
     | 
| 
      
 147 
     | 
    
         
            +
                               description = nil,
         
     | 
| 
      
 148 
     | 
    
         
            +
                               currency = nil,
         
     | 
| 
      
 149 
     | 
    
         
            +
                               interval = nil,
         
     | 
| 
      
 150 
     | 
    
         
            +
                               interval_count = nil,
         
     | 
| 
      
 151 
     | 
    
         
            +
                               pricing_scheme = nil,
         
     | 
| 
      
 152 
     | 
    
         
            +
                               items = nil,
         
     | 
| 
      
 153 
     | 
    
         
            +
                               shipping = nil,
         
     | 
| 
      
 154 
     | 
    
         
            +
                               discounts = nil,
         
     | 
| 
      
 155 
     | 
    
         
            +
                               metadata = nil,
         
     | 
| 
      
 156 
     | 
    
         
            +
                               setup = nil,
         
     | 
| 
      
 157 
     | 
    
         
            +
                               plan_id = nil,
         
     | 
| 
      
 158 
     | 
    
         
            +
                               customer_id = nil,
         
     | 
| 
      
 159 
     | 
    
         
            +
                               card_id = nil,
         
     | 
| 
      
 160 
     | 
    
         
            +
                               billing_day = nil,
         
     | 
| 
      
 161 
     | 
    
         
            +
                               installments = nil,
         
     | 
| 
      
 162 
     | 
    
         
            +
                               start_at = nil,
         
     | 
| 
      
 163 
     | 
    
         
            +
                               minimum_price = nil,
         
     | 
| 
      
 164 
     | 
    
         
            +
                               cycles = nil,
         
     | 
| 
      
 165 
     | 
    
         
            +
                               card_token = nil)
         
     | 
| 
      
 166 
     | 
    
         
            +
                  @customer = customer
         
     | 
| 
      
 167 
     | 
    
         
            +
                  @card = card
         
     | 
| 
      
 168 
     | 
    
         
            +
                  @code = code
         
     | 
| 
      
 169 
     | 
    
         
            +
                  @payment_method = payment_method
         
     | 
| 
      
 170 
     | 
    
         
            +
                  @billing_type = billing_type
         
     | 
| 
      
 171 
     | 
    
         
            +
                  @statement_descriptor = statement_descriptor
         
     | 
| 
      
 172 
     | 
    
         
            +
                  @description = description
         
     | 
| 
      
 173 
     | 
    
         
            +
                  @currency = currency
         
     | 
| 
      
 174 
     | 
    
         
            +
                  @interval = interval
         
     | 
| 
      
 175 
     | 
    
         
            +
                  @interval_count = interval_count
         
     | 
| 
      
 176 
     | 
    
         
            +
                  @pricing_scheme = pricing_scheme
         
     | 
| 
      
 177 
     | 
    
         
            +
                  @items = items
         
     | 
| 
      
 178 
     | 
    
         
            +
                  @shipping = shipping
         
     | 
| 
      
 179 
     | 
    
         
            +
                  @discounts = discounts
         
     | 
| 
      
 180 
     | 
    
         
            +
                  @metadata = metadata
         
     | 
| 
      
 181 
     | 
    
         
            +
                  @setup = setup
         
     | 
| 
      
 182 
     | 
    
         
            +
                  @plan_id = plan_id
         
     | 
| 
      
 183 
     | 
    
         
            +
                  @customer_id = customer_id
         
     | 
| 
      
 184 
     | 
    
         
            +
                  @card_id = card_id
         
     | 
| 
      
 185 
     | 
    
         
            +
                  @billing_day = billing_day
         
     | 
| 
      
 186 
     | 
    
         
            +
                  @installments = installments
         
     | 
| 
      
 187 
     | 
    
         
            +
                  @start_at = start_at
         
     | 
| 
      
 188 
     | 
    
         
            +
                  @minimum_price = minimum_price
         
     | 
| 
      
 189 
     | 
    
         
            +
                  @cycles = cycles
         
     | 
| 
      
 190 
     | 
    
         
            +
                  @card_token = card_token
         
     | 
| 
      
 191 
     | 
    
         
            +
                end
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
                # Creates an instance of the object from a hash.
         
     | 
| 
      
 194 
     | 
    
         
            +
                def self.from_hash(hash)
         
     | 
| 
      
 195 
     | 
    
         
            +
                  return nil unless hash
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
                  # Extract variables from the hash.
         
     | 
| 
      
 198 
     | 
    
         
            +
                  customer = CreateCustomerRequest.from_hash(hash['customer']) if
         
     | 
| 
      
 199 
     | 
    
         
            +
                    hash['customer']
         
     | 
| 
      
 200 
     | 
    
         
            +
                  card = CreateCardRequest.from_hash(hash['card']) if hash['card']
         
     | 
| 
      
 201 
     | 
    
         
            +
                  code = hash['code']
         
     | 
| 
      
 202 
     | 
    
         
            +
                  payment_method = hash['payment_method']
         
     | 
| 
      
 203 
     | 
    
         
            +
                  billing_type = hash['billing_type']
         
     | 
| 
      
 204 
     | 
    
         
            +
                  statement_descriptor = hash['statement_descriptor']
         
     | 
| 
      
 205 
     | 
    
         
            +
                  description = hash['description']
         
     | 
| 
      
 206 
     | 
    
         
            +
                  currency = hash['currency']
         
     | 
| 
      
 207 
     | 
    
         
            +
                  interval = hash['interval']
         
     | 
| 
      
 208 
     | 
    
         
            +
                  interval_count = hash['interval_count']
         
     | 
| 
      
 209 
     | 
    
         
            +
                  pricing_scheme = CreatePricingSchemeRequest.from_hash(hash['pricing_scheme']) if
         
     | 
| 
      
 210 
     | 
    
         
            +
                    hash['pricing_scheme']
         
     | 
| 
      
 211 
     | 
    
         
            +
                  # Parameter is an array, so we need to iterate through it
         
     | 
| 
      
 212 
     | 
    
         
            +
                  items = nil
         
     | 
| 
      
 213 
     | 
    
         
            +
                  unless hash['items'].nil?
         
     | 
| 
      
 214 
     | 
    
         
            +
                    items = []
         
     | 
| 
      
 215 
     | 
    
         
            +
                    hash['items'].each do |structure|
         
     | 
| 
      
 216 
     | 
    
         
            +
                      items << (CreateSubscriptionItemRequest.from_hash(structure) if structure)
         
     | 
| 
      
 217 
     | 
    
         
            +
                    end
         
     | 
| 
      
 218 
     | 
    
         
            +
                  end
         
     | 
| 
      
 219 
     | 
    
         
            +
                  shipping = CreateShippingRequest.from_hash(hash['shipping']) if
         
     | 
| 
      
 220 
     | 
    
         
            +
                    hash['shipping']
         
     | 
| 
      
 221 
     | 
    
         
            +
                  # Parameter is an array, so we need to iterate through it
         
     | 
| 
      
 222 
     | 
    
         
            +
                  discounts = nil
         
     | 
| 
      
 223 
     | 
    
         
            +
                  unless hash['discounts'].nil?
         
     | 
| 
      
 224 
     | 
    
         
            +
                    discounts = []
         
     | 
| 
      
 225 
     | 
    
         
            +
                    hash['discounts'].each do |structure|
         
     | 
| 
      
 226 
     | 
    
         
            +
                      discounts << (CreateDiscountRequest.from_hash(structure) if structure)
         
     | 
| 
      
 227 
     | 
    
         
            +
                    end
         
     | 
| 
      
 228 
     | 
    
         
            +
                  end
         
     | 
| 
      
 229 
     | 
    
         
            +
                  metadata = hash['metadata']
         
     | 
| 
      
 230 
     | 
    
         
            +
                  setup = CreateSetupRequest.from_hash(hash['setup']) if hash['setup']
         
     | 
| 
      
 231 
     | 
    
         
            +
                  plan_id = hash['plan_id']
         
     | 
| 
      
 232 
     | 
    
         
            +
                  customer_id = hash['customer_id']
         
     | 
| 
      
 233 
     | 
    
         
            +
                  card_id = hash['card_id']
         
     | 
| 
      
 234 
     | 
    
         
            +
                  billing_day = hash['billing_day']
         
     | 
| 
      
 235 
     | 
    
         
            +
                  installments = hash['installments']
         
     | 
| 
      
 236 
     | 
    
         
            +
                  start_at = DateTime.rfc3339(hash['start_at']) if hash['start_at']
         
     | 
| 
      
 237 
     | 
    
         
            +
                  minimum_price = hash['minimum_price']
         
     | 
| 
      
 238 
     | 
    
         
            +
                  cycles = hash['cycles']
         
     | 
| 
      
 239 
     | 
    
         
            +
                  card_token = hash['card_token']
         
     | 
| 
      
 240 
     | 
    
         
            +
             
     | 
| 
      
 241 
     | 
    
         
            +
                  # Create object from extracted values.
         
     | 
| 
      
 242 
     | 
    
         
            +
                  CreateSubscriptionRequest.new(customer,
         
     | 
| 
      
 243 
     | 
    
         
            +
                                                card,
         
     | 
| 
      
 244 
     | 
    
         
            +
                                                code,
         
     | 
| 
      
 245 
     | 
    
         
            +
                                                payment_method,
         
     | 
| 
      
 246 
     | 
    
         
            +
                                                billing_type,
         
     | 
| 
      
 247 
     | 
    
         
            +
                                                statement_descriptor,
         
     | 
| 
      
 248 
     | 
    
         
            +
                                                description,
         
     | 
| 
      
 249 
     | 
    
         
            +
                                                currency,
         
     | 
| 
      
 250 
     | 
    
         
            +
                                                interval,
         
     | 
| 
      
 251 
     | 
    
         
            +
                                                interval_count,
         
     | 
| 
      
 252 
     | 
    
         
            +
                                                pricing_scheme,
         
     | 
| 
      
 253 
     | 
    
         
            +
                                                items,
         
     | 
| 
      
 254 
     | 
    
         
            +
                                                shipping,
         
     | 
| 
      
 255 
     | 
    
         
            +
                                                discounts,
         
     | 
| 
      
 256 
     | 
    
         
            +
                                                metadata,
         
     | 
| 
      
 257 
     | 
    
         
            +
                                                setup,
         
     | 
| 
      
 258 
     | 
    
         
            +
                                                plan_id,
         
     | 
| 
      
 259 
     | 
    
         
            +
                                                customer_id,
         
     | 
| 
      
 260 
     | 
    
         
            +
                                                card_id,
         
     | 
| 
      
 261 
     | 
    
         
            +
                                                billing_day,
         
     | 
| 
      
 262 
     | 
    
         
            +
                                                installments,
         
     | 
| 
      
 263 
     | 
    
         
            +
                                                start_at,
         
     | 
| 
      
 264 
     | 
    
         
            +
                                                minimum_price,
         
     | 
| 
      
 265 
     | 
    
         
            +
                                                cycles,
         
     | 
| 
      
 266 
     | 
    
         
            +
                                                card_token)
         
     | 
| 
      
 267 
     | 
    
         
            +
                end
         
     | 
| 
      
 268 
     | 
    
         
            +
              end
         
     | 
| 
      
 269 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,44 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This file was automatically generated by APIMATIC v2.0
         
     | 
| 
      
 2 
     | 
    
         
            +
            # ( https://apimatic.io ).
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module MundiApi
         
     | 
| 
      
 5 
     | 
    
         
            +
              # Token data
         
     | 
| 
      
 6 
     | 
    
         
            +
              class CreateTokenRequest < BaseModel
         
     | 
| 
      
 7 
     | 
    
         
            +
                # Token type
         
     | 
| 
      
 8 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 9 
     | 
    
         
            +
                attr_accessor :type
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                # Card data
         
     | 
| 
      
 12 
     | 
    
         
            +
                # @return [CreateCardTokenRequest]
         
     | 
| 
      
 13 
     | 
    
         
            +
                attr_accessor :card
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                # A mapping from model property names to API property names.
         
     | 
| 
      
 16 
     | 
    
         
            +
                def self.names
         
     | 
| 
      
 17 
     | 
    
         
            +
                  if @_hash.nil?
         
     | 
| 
      
 18 
     | 
    
         
            +
                    @_hash = {}
         
     | 
| 
      
 19 
     | 
    
         
            +
                    @_hash['type'] = 'type'
         
     | 
| 
      
 20 
     | 
    
         
            +
                    @_hash['card'] = 'card'
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @_hash
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                def initialize(type = 'card',
         
     | 
| 
      
 26 
     | 
    
         
            +
                               card = nil)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @type = type
         
     | 
| 
      
 28 
     | 
    
         
            +
                  @card = card
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                # Creates an instance of the object from a hash.
         
     | 
| 
      
 32 
     | 
    
         
            +
                def self.from_hash(hash)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  return nil unless hash
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                  # Extract variables from the hash.
         
     | 
| 
      
 36 
     | 
    
         
            +
                  type = hash['type'] ||= 'card'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  card = CreateCardTokenRequest.from_hash(hash['card']) if hash['card']
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                  # Create object from extracted values.
         
     | 
| 
      
 40 
     | 
    
         
            +
                  CreateTokenRequest.new(type,
         
     | 
| 
      
 41 
     | 
    
         
            +
                                         card)
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,54 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This file was automatically generated by APIMATIC v2.0
         
     | 
| 
      
 2 
     | 
    
         
            +
            # ( https://apimatic.io ).
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 5 
     | 
    
         
            +
            module MundiApi
         
     | 
| 
      
 6 
     | 
    
         
            +
              # Request for creating a usage
         
     | 
| 
      
 7 
     | 
    
         
            +
              class CreateUsageRequest < BaseModel
         
     | 
| 
      
 8 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 9 
     | 
    
         
            +
                # @return [Integer]
         
     | 
| 
      
 10 
     | 
    
         
            +
                attr_accessor :quantity
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 13 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 14 
     | 
    
         
            +
                attr_accessor :description
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 17 
     | 
    
         
            +
                # @return [DateTime]
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :used_at
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                # A mapping from model property names to API property names.
         
     | 
| 
      
 21 
     | 
    
         
            +
                def self.names
         
     | 
| 
      
 22 
     | 
    
         
            +
                  if @_hash.nil?
         
     | 
| 
      
 23 
     | 
    
         
            +
                    @_hash = {}
         
     | 
| 
      
 24 
     | 
    
         
            +
                    @_hash['quantity'] = 'quantity'
         
     | 
| 
      
 25 
     | 
    
         
            +
                    @_hash['description'] = 'description'
         
     | 
| 
      
 26 
     | 
    
         
            +
                    @_hash['used_at'] = 'used_at'
         
     | 
| 
      
 27 
     | 
    
         
            +
                  end
         
     | 
| 
      
 28 
     | 
    
         
            +
                  @_hash
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                def initialize(quantity = nil,
         
     | 
| 
      
 32 
     | 
    
         
            +
                               description = nil,
         
     | 
| 
      
 33 
     | 
    
         
            +
                               used_at = nil)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  @quantity = quantity
         
     | 
| 
      
 35 
     | 
    
         
            +
                  @description = description
         
     | 
| 
      
 36 
     | 
    
         
            +
                  @used_at = used_at
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Creates an instance of the object from a hash.
         
     | 
| 
      
 40 
     | 
    
         
            +
                def self.from_hash(hash)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  return nil unless hash
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                  # Extract variables from the hash.
         
     | 
| 
      
 44 
     | 
    
         
            +
                  quantity = hash['quantity']
         
     | 
| 
      
 45 
     | 
    
         
            +
                  description = hash['description']
         
     | 
| 
      
 46 
     | 
    
         
            +
                  used_at = DateTime.rfc3339(hash['used_at']) if hash['used_at']
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                  # Create object from extracted values.
         
     | 
| 
      
 49 
     | 
    
         
            +
                  CreateUsageRequest.new(quantity,
         
     | 
| 
      
 50 
     | 
    
         
            +
                                         description,
         
     | 
| 
      
 51 
     | 
    
         
            +
                                         used_at)
         
     | 
| 
      
 52 
     | 
    
         
            +
                end
         
     | 
| 
      
 53 
     | 
    
         
            +
              end
         
     | 
| 
      
 54 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,72 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This file was automatically generated by APIMATIC v2.0
         
     | 
| 
      
 2 
     | 
    
         
            +
            # ( https://apimatic.io ).
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module MundiApi
         
     | 
| 
      
 5 
     | 
    
         
            +
              # The settings for creating a voucher payment
         
     | 
| 
      
 6 
     | 
    
         
            +
              class CreateVoucherPaymentRequest < BaseModel
         
     | 
| 
      
 7 
     | 
    
         
            +
                # Indicates if the operation should be only authorization or auth and
         
     | 
| 
      
 8 
     | 
    
         
            +
                # capture.
         
     | 
| 
      
 9 
     | 
    
         
            +
                # @return [Boolean]
         
     | 
| 
      
 10 
     | 
    
         
            +
                attr_accessor :capture
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                # The text that will be shown on the voucher's statement
         
     | 
| 
      
 13 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 14 
     | 
    
         
            +
                attr_accessor :statement_descriptor
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                # Card id
         
     | 
| 
      
 17 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :card_id
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                # Card token
         
     | 
| 
      
 21 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :card_token
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                # Card info
         
     | 
| 
      
 25 
     | 
    
         
            +
                # @return [CreateCardRequest]
         
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :card
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # A mapping from model property names to API property names.
         
     | 
| 
      
 29 
     | 
    
         
            +
                def self.names
         
     | 
| 
      
 30 
     | 
    
         
            +
                  if @_hash.nil?
         
     | 
| 
      
 31 
     | 
    
         
            +
                    @_hash = {}
         
     | 
| 
      
 32 
     | 
    
         
            +
                    @_hash['capture'] = 'capture'
         
     | 
| 
      
 33 
     | 
    
         
            +
                    @_hash['statement_descriptor'] = 'statement_descriptor'
         
     | 
| 
      
 34 
     | 
    
         
            +
                    @_hash['card_id'] = 'card_id'
         
     | 
| 
      
 35 
     | 
    
         
            +
                    @_hash['card_token'] = 'card_token'
         
     | 
| 
      
 36 
     | 
    
         
            +
                    @_hash['card'] = 'Card'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  end
         
     | 
| 
      
 38 
     | 
    
         
            +
                  @_hash
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                def initialize(capture = nil,
         
     | 
| 
      
 42 
     | 
    
         
            +
                               statement_descriptor = nil,
         
     | 
| 
      
 43 
     | 
    
         
            +
                               card_id = nil,
         
     | 
| 
      
 44 
     | 
    
         
            +
                               card_token = nil,
         
     | 
| 
      
 45 
     | 
    
         
            +
                               card = nil)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  @capture = capture
         
     | 
| 
      
 47 
     | 
    
         
            +
                  @statement_descriptor = statement_descriptor
         
     | 
| 
      
 48 
     | 
    
         
            +
                  @card_id = card_id
         
     | 
| 
      
 49 
     | 
    
         
            +
                  @card_token = card_token
         
     | 
| 
      
 50 
     | 
    
         
            +
                  @card = card
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                # Creates an instance of the object from a hash.
         
     | 
| 
      
 54 
     | 
    
         
            +
                def self.from_hash(hash)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  return nil unless hash
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                  # Extract variables from the hash.
         
     | 
| 
      
 58 
     | 
    
         
            +
                  capture = hash['capture']
         
     | 
| 
      
 59 
     | 
    
         
            +
                  statement_descriptor = hash['statement_descriptor']
         
     | 
| 
      
 60 
     | 
    
         
            +
                  card_id = hash['card_id']
         
     | 
| 
      
 61 
     | 
    
         
            +
                  card_token = hash['card_token']
         
     | 
| 
      
 62 
     | 
    
         
            +
                  card = CreateCardRequest.from_hash(hash['Card']) if hash['Card']
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  # Create object from extracted values.
         
     | 
| 
      
 65 
     | 
    
         
            +
                  CreateVoucherPaymentRequest.new(capture,
         
     | 
| 
      
 66 
     | 
    
         
            +
                                                  statement_descriptor,
         
     | 
| 
      
 67 
     | 
    
         
            +
                                                  card_id,
         
     | 
| 
      
 68 
     | 
    
         
            +
                                                  card_token,
         
     | 
| 
      
 69 
     | 
    
         
            +
                                                  card)
         
     | 
| 
      
 70 
     | 
    
         
            +
                end
         
     | 
| 
      
 71 
     | 
    
         
            +
              end
         
     | 
| 
      
 72 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,73 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This file was automatically generated by APIMATIC v2.0
         
     | 
| 
      
 2 
     | 
    
         
            +
            # ( https://apimatic.io ).
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 5 
     | 
    
         
            +
            module MundiApi
         
     | 
| 
      
 6 
     | 
    
         
            +
              # Response object for getting a access token
         
     | 
| 
      
 7 
     | 
    
         
            +
              class GetAccessTokenResponse < BaseModel
         
     | 
| 
      
 8 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 9 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 10 
     | 
    
         
            +
                attr_accessor :id
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 13 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 14 
     | 
    
         
            +
                attr_accessor :code
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 17 
     | 
    
         
            +
                # @return [String]
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :status
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 21 
     | 
    
         
            +
                # @return [DateTime]
         
     | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :created_at
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                # TODO: Write general description for this method
         
     | 
| 
      
 25 
     | 
    
         
            +
                # @return [GetCustomerResponse]
         
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :customer
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                # A mapping from model property names to API property names.
         
     | 
| 
      
 29 
     | 
    
         
            +
                def self.names
         
     | 
| 
      
 30 
     | 
    
         
            +
                  if @_hash.nil?
         
     | 
| 
      
 31 
     | 
    
         
            +
                    @_hash = {}
         
     | 
| 
      
 32 
     | 
    
         
            +
                    @_hash['id'] = 'id'
         
     | 
| 
      
 33 
     | 
    
         
            +
                    @_hash['code'] = 'code'
         
     | 
| 
      
 34 
     | 
    
         
            +
                    @_hash['status'] = 'status'
         
     | 
| 
      
 35 
     | 
    
         
            +
                    @_hash['created_at'] = 'created_at'
         
     | 
| 
      
 36 
     | 
    
         
            +
                    @_hash['customer'] = 'customer'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  end
         
     | 
| 
      
 38 
     | 
    
         
            +
                  @_hash
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                def initialize(id = nil,
         
     | 
| 
      
 42 
     | 
    
         
            +
                               code = nil,
         
     | 
| 
      
 43 
     | 
    
         
            +
                               status = nil,
         
     | 
| 
      
 44 
     | 
    
         
            +
                               created_at = nil,
         
     | 
| 
      
 45 
     | 
    
         
            +
                               customer = nil)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  @id = id
         
     | 
| 
      
 47 
     | 
    
         
            +
                  @code = code
         
     | 
| 
      
 48 
     | 
    
         
            +
                  @status = status
         
     | 
| 
      
 49 
     | 
    
         
            +
                  @created_at = created_at
         
     | 
| 
      
 50 
     | 
    
         
            +
                  @customer = customer
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                # Creates an instance of the object from a hash.
         
     | 
| 
      
 54 
     | 
    
         
            +
                def self.from_hash(hash)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  return nil unless hash
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                  # Extract variables from the hash.
         
     | 
| 
      
 58 
     | 
    
         
            +
                  id = hash['id']
         
     | 
| 
      
 59 
     | 
    
         
            +
                  code = hash['code']
         
     | 
| 
      
 60 
     | 
    
         
            +
                  status = hash['status']
         
     | 
| 
      
 61 
     | 
    
         
            +
                  created_at = DateTime.rfc3339(hash['created_at']) if hash['created_at']
         
     | 
| 
      
 62 
     | 
    
         
            +
                  customer = GetCustomerResponse.from_hash(hash['customer']) if
         
     | 
| 
      
 63 
     | 
    
         
            +
                    hash['customer']
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                  # Create object from extracted values.
         
     | 
| 
      
 66 
     | 
    
         
            +
                  GetAccessTokenResponse.new(id,
         
     | 
| 
      
 67 
     | 
    
         
            +
                                             code,
         
     | 
| 
      
 68 
     | 
    
         
            +
                                             status,
         
     | 
| 
      
 69 
     | 
    
         
            +
                                             created_at,
         
     | 
| 
      
 70 
     | 
    
         
            +
                                             customer)
         
     | 
| 
      
 71 
     | 
    
         
            +
                end
         
     | 
| 
      
 72 
     | 
    
         
            +
              end
         
     | 
| 
      
 73 
     | 
    
         
            +
            end
         
     |