Exemplo n.º 1
0
    def get_profile(**kw):
        """get a user's profile

        arguments:
            customer_profile_id: required
        """
        return ('getCustomerProfileRequest', kw,
                x.customerProfileId(kw['customer_profile_id']))
Exemplo n.º 2
0
    def delete_profile(**kw):
        """delete one's profile

        arguments:
            customer_profile_id: required
        """
        return ('deleteCustomerProfileRequest', kw,
                x.customerProfileId(kw['customer_profile_id']))
Exemplo n.º 3
0
    def delete_profile(**kw):
        """delete one's profile

        arguments:
            customer_profile_id: required
        """
        return ('deleteCustomerProfileRequest', kw,
            x.customerProfileId(kw['customer_profile_id'])
        )
Exemplo n.º 4
0
    def get_profile(**kw):
        """get a user's profile

        arguments:
            customer_profile_id: required
        """
        return ('getCustomerProfileRequest', kw,
            x.customerProfileId(kw['customer_profile_id'])
        )
Exemplo n.º 5
0
    def get_shipping_address(**kw):
        """get a user's shipping address

        arguments:
            customer_profile_id: required
            customer_address_id: required
        """
        return ('getCustomerShippingAddressRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                x.customerAddressId(kw['customer_address_id']))
Exemplo n.º 6
0
    def delete_shipping_address(**kw):
        """delete one of user's shipping addresses

        arguments:
            customer_profile_id: required
            customer_address_id: required
        """
        return ('deleteCustomerShippingAddressRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                x.customerAddressId(kw['customer_address_id']))
Exemplo n.º 7
0
    def delete_payment_profile(**kw):
        """delete one of user's payment profiles

        arguments:
            customer_profile_id: required
            customer_payment_profile_id: required
        """
        return ('deleteCustomerPaymentProfileRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                x.customerPaymentProfileId(kw['customer_payment_profile_id']))
Exemplo n.º 8
0
    def delete_shipping_address(**kw):
        """delete one of user's shipping addresses

        arguments:
            customer_profile_id: required
            customer_address_id: required
        """
        return ('deleteCustomerShippingAddressRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            x.customerAddressId(kw['customer_address_id'])
        )
Exemplo n.º 9
0
    def get_shipping_address(**kw):
        """get a user's shipping address

        arguments:
            customer_profile_id: required
            customer_address_id: required
        """
        return ('getCustomerShippingAddressRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            x.customerAddressId(kw['customer_address_id'])
        )
Exemplo n.º 10
0
    def delete_payment_profile(**kw):
        """delete one of user's payment profiles

        arguments:
            customer_profile_id: required
            customer_payment_profile_id: required
        """
        return ('deleteCustomerPaymentProfileRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            x.customerPaymentProfileId(kw['customer_payment_profile_id'])
        )
Exemplo n.º 11
0
    def create_shipping_address(**kw):
        """add to a user's profile a new shipping address

        arguments:
            REQUIRED:
                customer_profile_id: L{unicode} or L{int}
                all the arguments above starting with 'ship_' can be
                    provided here with the same name.
        """
        return ('createCustomerShippingAddressRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                xml.address_2('ship_', **kw))
Exemplo n.º 12
0
    def create_shipping_address(**kw):
        """add to a user's profile a new shipping address

        arguments:
            REQUIRED:
                customer_profile_id: L{unicode} or L{int}
                all the arguments above starting with 'ship_' can be
                    provided here with the same name.
        """
        return ('createCustomerShippingAddressRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            xml.address_2('ship_', **kw)
        )
Exemplo n.º 13
0
    def update_shipping_address(**kw):
        """update user's shipping address

        arguments:
            customer_profile_id: required

            and the same arguments for shipping_address with the
            addition of an extra argument called
            customer_address_id added for each shipping_address that
            you intend to change.
        """
        return ('updateCustomerShippingAddressRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                xml.update_address(**kw))
Exemplo n.º 14
0
    def update_profile(**kw):
        """update basic user's information

        arguments:
            customer_id: optional
            description: optional
            email: optional
            customer_profile_id: required
        """
        return ('updateCustomerProfileRequest', kw,
                x.profile(x.merchantCustomerId(kw.get('customer_id')),
                          x.description(kw.get('description')),
                          x.email(kw.get('email')),
                          x.customerProfileId(kw['customer_profile_id'])))
Exemplo n.º 15
0
    def update_payment_profile(**kw):
        """update user's payment profile

        arguments:
            customer_profile_id: required

            and the same arguments for payment_profiles with the
            addition of an extra argument called
            customer_payment_profile_id added for each payment_profile
            that you intend to change.
        """
        return ('updateCustomerPaymentProfileRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                xml.update_paymentProfile(**kw))
Exemplo n.º 16
0
    def validate_payment_profile(**kw):
        """validate a user's payment profile

        arguments:
            customer_profile_id: required
            customer_payment_profile_id: required
            customer_address_id: required
            validation_mode: L{VALIDATION_TEST} or L{VALIDATION_LIVE} or L{VALIDATION_NONE}, default L{VALIDATION_NONE}
        """
        return ('validateCustomerPaymentProfileRequest', kw,
                x.customerProfileId(kw['customer_profile_id']),
                x.customerPaymentProfileId(kw['customer_payment_profile_id']),
                x.customerShippingAddressId(kw['customer_address_id']),
                x.validationMode(kw.get('validation_mode', VALIDATION_NONE)))
Exemplo n.º 17
0
    def update_shipping_address(**kw):
        """update user's shipping address

        arguments:
            customer_profile_id: required

            and the same arguments for shipping_address with the
            addition of an extra argument called
            customer_address_id added for each shipping_address that
            you intend to change.
        """
        return ('updateCustomerShippingAddressRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            xml.update_address(**kw)
        )
Exemplo n.º 18
0
    def update_payment_profile(**kw):
        """update user's payment profile

        arguments:
            customer_profile_id: required

            and the same arguments for payment_profiles with the
            addition of an extra argument called
            customer_payment_profile_id added for each payment_profile
            that you intend to change.
        """
        return ('updateCustomerPaymentProfileRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            xml.update_paymentProfile(**kw)
        )
Exemplo n.º 19
0
    def validate_payment_profile(**kw):
        """validate a user's payment profile

        arguments:
            customer_profile_id: required
            customer_payment_profile_id: required
            customer_address_id: required
            validation_mode: L{VALIDATION_TEST} or L{VALIDATION_LIVE} or L{VALIDATION_NONE}, default L{VALIDATION_NONE}
        """
        return ('validateCustomerPaymentProfileRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            x.customerPaymentProfileId(kw['customer_payment_profile_id']),
            x.customerShippingAddressId(kw.get('customer_address_id')),
            x.validationMode(kw.get('validation_mode', VALIDATION_NONE))
        )
Exemplo n.º 20
0
    def update_profile(**kw):
        """update basic user's information

        arguments:
            customer_id: optional
            description: optional
            email: optional
            customer_profile_id: required
        """
        return ('updateCustomerProfileRequest', kw,
            x.profile(
                x.merchantCustomerId(kw.get('customer_id')),
                x.description(kw.get('description')),
                x.email(kw.get('email')),
                x.customerProfileId(kw['customer_profile_id'])
            )
        )
Exemplo n.º 21
0
    def create_payment_profile(**kw):
        """add to a user's profile a new payment profile

        arguments:
            REQUIRED:
                customer_profile_id: L{unicode} or L{int}
                all the arguments for payment_profiles (above) should
                    be provided as arguments to this method call
                validation_mode: L{VALIDATION_TEST}, L{VALIDATION_LIVE}, L{VALIDATION_NONE},
                    the different level of validation will try to run and immediately
                    void 0.01 transactions on live or test environment, L{VALIDATION_NONE}
                    will skip this test. By default it's L{VALIDATION_NONE}
        """
        return ('createCustomerPaymentProfileRequest', kw,
            x.customerProfileId(kw['customer_profile_id']),
            xml.paymentProfile(**kw),
            x.validationMode(kw.get('validation_mode', VALIDATION_NONE)) # none, testMode, liveMode
        )
Exemplo n.º 22
0
    def create_payment_profile(**kw):
        """add to a user's profile a new payment profile

        arguments:
            REQUIRED:
                customer_profile_id: L{unicode} or L{int}
                all the arguments for payment_profiles (above) should
                    be provided as arguments to this method call
                validation_mode: L{VALIDATION_TEST}, L{VALIDATION_LIVE}, L{VALIDATION_NONE},
                    the different level of validation will try to run and immediately
                    void 0.01 transactions on live or test environment, L{VALIDATION_NONE}
                    will skip this test. By default it's L{VALIDATION_NONE}
        """
        return (
            'createCustomerPaymentProfileRequest',
            kw,
            x.customerProfileId(kw['customer_profile_id']),
            xml.paymentProfile(**kw),
            x.validationMode(
                kw.get('validation_mode',
                       VALIDATION_NONE))  # none, testMode, liveMode
        )